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
As non superuser, when editing a page having a Page Reference field (which has field-level access control), the rendering of the edit view fails, with :
Fatal Error: Uncaught TypeError: Illegal offset type in isset or empty in C:\xampp\data\www_smh\www\wire\core\Page.php:978 Stack trace: #0 C:\xampp\data\www_smh\www\site\assets\cache\FileCompiler\site\modules\AdminPageFieldEditLinks\AdminPageFieldEditLinks.module(155): Page->get(Object(PageField)) #1 C:\xampp\data\www_smh\www\wire\core\WireHooks.php(1050): AdminPageFieldEditLinks->{closure}(Object(HookEvent))
This is Page.php, line 978 :
if(isset(PageProperties::$basePropertiesAlternates[$key])) {
By catching the exception, it appears that $key is an object, of type ProcessWire\PageField,
actually it's a Page Reference field.
As a temporary measure, if I add the condition
&& !is_object($key)
then the rendering succeeds (but I have no idea of the implications, in terms of access control etc)
Note : Same pattern & issue on line 1397 :
if($value !== null && isset($this->wakeupNameQueue[$key])) {
Setup/Environment
ProcessWire version: 3.0.203
PHP version: 8.0.15
The text was updated successfully, but these errors were encountered:
Hi, that error is caused by the module AdminPageFieldEditLinks and was fixed in this commit. Please download the current version of the module from AdminPageFieldEditLinks/releases . Unfortunately the version numbe was not incremented, that’s why ProcessWire does not find the new version in the module section.
Ah yes, sorry, I forgot that AdminPageFieldEditLinks was a third-party module.
Thanks a lot for directly pointing to the root cause ; I confirm that the module update fixes the error.
Short description of the issue
As non superuser, when editing a page having a Page Reference field (which has field-level access control), the rendering of the edit view fails, with :
Fatal Error: Uncaught TypeError: Illegal offset type in isset or empty in C:\xampp\data\www_smh\www\wire\core\Page.php:978 Stack trace: #0 C:\xampp\data\www_smh\www\site\assets\cache\FileCompiler\site\modules\AdminPageFieldEditLinks\AdminPageFieldEditLinks.module(155): Page->get(Object(PageField)) #1 C:\xampp\data\www_smh\www\wire\core\WireHooks.php(1050): AdminPageFieldEditLinks->{closure}(Object(HookEvent))
This is Page.php, line 978 :
if(isset(PageProperties::$basePropertiesAlternates[$key])) {
By catching the exception, it appears that $key is an object, of type ProcessWire\PageField,
actually it's a Page Reference field.
As a temporary measure, if I add the condition
&& !is_object($key)
then the rendering succeeds (but I have no idea of the implications, in terms of access control etc)
Note : Same pattern & issue on line 1397 :
if($value !== null && isset($this->wakeupNameQueue[$key])) {
Setup/Environment
The text was updated successfully, but these errors were encountered: