Jump to content

Page can't be edited if admin has non-default language


valan
 Share

Recommended Posts

Hello! I've checked the forum but haven't found anything like this -

Page can't be opened for editing when user (admin) is switched to different from default language and attempts to edit page based on one of templates. Error as below appears. When user is switched to default (English) language, everything works fine. Pages based on other templates are also editable independently on user language. E.g. problem is clearly localized in that "problematic" template.

If user attempts to create new page with this template in non-default language - the same error, but PW creates page. It just do not pass user to field edit screens, showing the error.

This template is the most complex one, with around 50 fields of all kind. Initially I thought that problem could be in few "custom areas", but currently they are removed but problem persists. I'll mention these areas here just in case it could somehow influence even being removed...

(1) there was a custom module that hooked savePage event to change values in some fields of this template. Currently uninstalled.

(2) there were Page fields with custom PHP select, like "return $page->parent;". Currently fields removed. 

I can try do dig deeper, but currently can't understand in which direction... Any help is appreciated! Thanks!

Strict Standards: Creating default object from empty value in /share/MD0_DATA/Web/zeerq/wire/modules/LanguageSupport/LanguageSupport.module on line 380

Catchable fatal error: Argument 1 passed to InputfieldWrapper::add() must be an instance of Inputfield, instance of stdClass given, called in /share/MD0_DATA/Web/zeerq/wire/core/Fieldgroup.php on line 342 and defined in/share/MD0_DATA/Web/zeerq/wire/core/InputfieldWrapper.php on line 139
 
 
Link to comment
Share on other sites

Hi, Valan.

I guess you should try to log the inputfield name in a cycle just before LanguageSupport.module on line 380 so you could understand when it breaks.

Also try to substitute line 379 temporary just to see if the problem remains: if(!$value && (!$inputfield instanceof Inputfield)) continue;

Seems like you have some problem with an instance of a wrong class. Have no idea what causes this error.

Cheers.

  • Like 3
Link to comment
Share on other sites

I'm not sure about this one or exactly how to reproduce from here. But if you want to give me a login to this site and tell me what/where to click to reproduce it, I'd be happy to take a closer look. Also let me know what version of PW you are using and whether dev branch or not. 

  • Like 1
Link to comment
Share on other sites

slkwrm, thank you for trick idea!

I've checked which field can cause error and looks like problem could be in a concat field. Its $inputfield is always NULL.

I think I can delete and see what happens, but if the problem is not installation-specific, then it may be interesting for Ryan before deletion.

Ryan, hi! I'll drop you a note with details into the mailbox. Thank you for attention!

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...