You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ((bool)($GLOBALS['BE_USER']->uc['hideYoastInPageModule'] ?? false)) {
does not take the default value of the TYPO3_USER_SETTINGS hideYoastInPageModule into account and expect that snippet is enabled.
Please describe what you expected to happen and why.
I'd expect the utility to take the default value into account in the condition, so it first checko the uc of the user and fallback to the default value
if ((bool)($GLOBALS['BE_USER']->uc['hideYoastInPageModule'] ?? !($GLOBALS['TYPO3_USER_SETTINGS']['hideYoastInPageModule']['columns']['default'])) {
return false;
}
And set a default value in ext_tables.php for backward compability
How can we reproduce this behavior?
Set a default value for hideYoastInPageModule to true
Set the UI of the User Settings reflect that value
Find that the snippet is still shown, because it's not saved to the uc field, untill the user clicks save
Technical info
TYPO3 version: 12.4.5
Yoast SEO version: 9.0.3
The text was updated successfully, but these errors were encountered:
Sorry to get back at you so late, I've been testing with these settings and it seems that if you set a default (true/1) on $GLOBALS['TYPO3_USER_SETTINGS']['columns']['hideYoastInPageModule'] it's not possible for a user to "uncheck" it and thus allow the snippet preview to render.
Please give us a description of what happened.
The
YoastUtility
methodsnippetPreviewEnabled
Yoast-SEO-for-TYPO3/Classes/Utility/YoastUtility.php
Line 51 in c1e4ae9
does not take the default value of the TYPO3_USER_SETTINGS
hideYoastInPageModule
into account and expect that snippet is enabled.Please describe what you expected to happen and why.
I'd expect the utility to take the default value into account in the condition, so it first checko the
uc
of the user and fallback to the default valueAnd set a default value in ext_tables.php for backward compability
How can we reproduce this behavior?
hideYoastInPageModule
totrue
uc
field, untill the user clickssave
Technical info
The text was updated successfully, but these errors were encountered: