My custom block gets multiple nodes and uses ViewBuilder to render these nodes. The node titles in this block are linked to the canonical route. That works for a default but my customer wants to link to an external link if that attribute has that value. So I'm incorporating TrustedCallbackInterface in my custom block to build a pre_render callback. But I'm getting an unexpected error:
Parameter 1 to Drupal\mymodule\Plugin\Block\MyBlock::changeUrl() expected to be a reference
first of all i tried to print field content as {{ kint(field) }} but it causes blank page, also {{ kint(field.content) }} renders markup output, i need to check the field name as below
Hallo, scuse for my English. I need to’ login to mysite using a php script. I have trouble with the password.
I need crypt the clear password in the encrypted to query the table users_field_data and i read that si possible through password-hash.sh but i can not understand how it’s done. Please help me ... thanks
I was struggling with high page load time for my node pages when I realized that the problem was due to content pages not being cached (I am talking about the cache for the full page). The page is rebuilt after every single request. With some hit and trial, I realized that fields that have form elements, in my case, Fivestar widget and also the comment form at the bottom of the page (either of them) prevent page from getting cached. This adds 1-1.5 seconds in page load time for Mobile.
When I remove both those two fields, page starts to get cached.
I have created custom display view & have role based access, I have assigned it to multiple roles. It's working fine on my staging ENV, recently I have moved my site to production ENV, there it's says You are not authorized to access this page. even if I am logged in with admin user.
However, if I assign role named Authenticated User, it starts working
Please see attached screenshots for further understanding:
My problem is that for some users (not for all) when they submit a form the get the error:
'The form has become outdated. Press the back button, copy any unsaved work in the form, and then reload the page'
And the are not allowed to send the form.
The user is logged before he is sent to the form by this way:
$user = user_load(4478);
$form_state = array();
$form_state['uid'] = $user->uid;
user_login_submit(array(), $form_state);