Page 1 of 1

static pages and search fatal error

Posted: Fri Jan 17, 2014 10:02 pm
by lurch
When navigating to a static page or using the search box I get the following error

Code: Select all

Fatal error: Uncaught exception 'ErrorException' with message 'Serendipity error: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #2 is not an array' in /home/user1/public_html/include/compat.inc.php:118 Stack trace: #0 [internal function]: errorToExceptionHandler(Array, NULL) #1 /home/user1/public_html/bundled-libs/Smarty/libs/sysplugins/smarty_internal_templatebase.php(75): array_merge('file:/home/user...', NULL, NULL, false) #2 /home/user1/public_html/plugins/serendipity_event_staticpage/serendipity_event_staticpage.php(1179): Smarty_Internal_TemplateBase->fetch() #3 /home/user1/public_html/plugins/serendipity_event_staticpage/serendipity_event_staticpage.php(1191): serendipity_event_staticpage->parseStaticPage() #4 /home/user1/public_html/plugins/serendipity_event_staticpage/serendipity_event_staticpage.php(2773): serendipity_event_staticpage->show('entries_header', Objec in /home/user1/public_html/include/compat.inc.php on line 118
Can anyone decipher it for me?

Re: static pages and search fatal error

Posted: Sat Jan 18, 2014 10:14 am
by Timbalu
It means that second Argument #2 ($tpl_vars) is not an array

Code: Select all

            if (!empty(Smarty::$global_tpl_vars)) {
                $tpl_vars = array_merge(Smarty::$global_tpl_vars, $tpl_vars);
            }
and seems to say, the template vars (like $entry.header, $entry.body etc) are not overhanded as an array. That is strange!
Which PHP, Staticpage plugin and Serendipity version, please?
What did you do? Did you upgrade the Staticpages plugin (or S9y to 1.7 series) lately? Did this definitely work before (S9y/Smarty version series)?
Please also check your entries in the staticpage_precontent field. There might be something wrong with it. (Into the blue: that field does not exist, carries a blank char, or the template is not fetched correctly...)

Re: static pages and search fatal error

Posted: Sat Jan 18, 2014 10:22 am
by lurch
Hi thanks for the reply, a little while ago I upgraded to 1.7-rc3 and after this it stopped working and it's running version: 3.80 of the static pages plugin.

Re: static pages and search fatal error

Posted: Sat Jan 18, 2014 10:28 am
by Timbalu
"Ok" - please upgrade both!
Then we can talk again. :wink:

Re: static pages and search fatal error

Posted: Sat Jan 18, 2014 10:36 am
by yellowled
Might want to wait a few more hours until the 1.7.5 release is public.

YL

Re: static pages and search fatal error

Posted: Sat Jan 18, 2014 1:19 pm
by lurch
sorted buy upgrading to 1.7.5 and updating the staticpage plugin thank you for your help.

Re: static pages and search fatal error

Posted: Sat Jan 18, 2014 1:29 pm
by Timbalu
...and next time do not wait another year! :P We know this is Serendipity, but upgrades are a necessary thing, to always get latest security and best known working draft. Usually they just work!

Re: static pages and search fatal error

Posted: Sat Jan 18, 2014 2:13 pm
by lurch
I know i'm bad i'll be more on top of it in future :wink: