valan Posted May 28, 2013 Posted May 28, 2013 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
slkwrm Posted May 29, 2013 Posted May 29, 2013 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. 3
ryan Posted June 1, 2013 Posted June 1, 2013 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. 1
valan Posted June 1, 2013 Author Posted June 1, 2013 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!
valan Posted August 1, 2013 Author Posted August 1, 2013 Solved with new version of FieldtypeConcat field. 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now