Page 1 of 1

Upgrade Prob - array_merge()...

Posted: Wed Jun 05, 2013 4:58 am
by petersreviews
OK, this is not the first time I've upgraded but the first time I've had problems. Going from 1.6 to 1.7 I get this:

array_merge() [function.array-merge]: Argument #2 is not an array in (directory removed) html/bundled-libs/Smarty/libs/sysplugins/smarty_internal_templatebase.php on line 75

The homepage is now broken. Any suggestions?

Peter

Re: Upgrade Prob - array_merge()...

Posted: Wed Jun 05, 2013 9:29 am
by Timbalu
Where is it broken exactly?

Did you upgrade all installed Plugins before or right after the upgrade?
That might be the issue. Could be staticpages!
The installation process told you to check certain things. Upgrading Plugins was one of it, template changes another, and restricted use of API methods in individual plugins the last.

Else you could have a look, if you succumb on this topic
http://blog.s9y.org/archives/248-BaseUR ... y-1.7.html

Is that a multi-blog system?

Re: Upgrade Prob - array_merge()...

Posted: Wed Jun 05, 2013 5:19 pm
by petersreviews
Timbalu wrote:Where is it broken exactly?
The front page no longer works.
Timbalu wrote:Did you upgrade all installed Plugins before or right after the upgrade?
I'm pretty sure I did but I've used Serendipity so long it's possible that I got overconfident and didn't upgrade. When I checked, they seem to be up to date now. I wonder if it makes a difference before or after installation?
Timbalu wrote:Else you could have a look, if you succumb on this topic
http://blog.s9y.org/archives/248-BaseUR ... y-1.7.html
I tried all suggestions on this page and it fixed some problems but not my main page.
Timbalu wrote:Is that a multi-blog system?
Nope

Thanks for taking time to respond! If I find a solution, I'll be sure to post it. Meanwhile, wish me luck!

Peter

Re: Upgrade Prob - array_merge()...

Posted: Wed Jun 05, 2013 5:33 pm
by Timbalu
petersreviews wrote:The front page no longer works.
Where do you mean? http://www.petersreviews.com/ is doing well without error.
petersreviews wrote:When I checked, they seem to be up to date now. I wonder if it makes a difference before or after installation?
Not really, but sometimes it could. It is better to do it first, to not get any errors (if there are any). Doing it afterwards should error and as soon as having upgraded these plugins, they should be gone. You did use Spartacus for this?

Re: Upgrade Prob - array_merge()...

Posted: Wed Jun 05, 2013 5:44 pm
by petersreviews
Timbalu wrote:Where do you mean? http://www.petersreviews.com/ is doing well without error.
Whoops. Should have specified that it's another page. [url]http:cuteotters.com[/url]
Timbalu wrote:Not really, but sometimes it could. It is better to do it first, to not get any errors (if there are any). Doing it afterwards should error and as soon as having upgraded these plugins, they should be gone. You did use Spartacus for this?
There was only one element that wasn't updated before and I fixed that. I have Spartacus installed so if I use the "Update sidebar plugins" or "Update event plugins" does it use Spartacus?
I also ran the Verify Installation Integrity and it comes up good.

Re: Upgrade Prob - array_merge()...

Posted: Wed Jun 05, 2013 5:50 pm
by Timbalu
Hmm, I see.
I still think it is an outdated plugin.

Could you please temporary add

Code: Select all

$serendipity['production'] = 'debug';
into the serendipity_config_local.inc.php file, to see what the error trace path says?

If Spartacus is installed the "Update event plugins" link should do well. And as I can see, your backend would still work though.

You might also clean up the compiled template files (dirs) in templates_c to be sure this compiles the current state.

As you can see on petersreviews, Serendipity 1.7 is doing well. so there must be something special in cuteotters. (Just as a sidenote: Do not put html tags, like the div, into the html page <head>...</head> part. This is not wellformed html, but modern browsers will normally just display fine.)

Re: Upgrade Prob - array_merge()...

Posted: Wed Jun 05, 2013 8:43 pm
by petersreviews
You are awesome for helping! I just did it and this is what came back.

== FULL DEBUG ERROR MODE ==



Fatal error: Uncaught exception 'ErrorException' with message 'Declaration of serendipity_event_browsercompatibility::event_hook() should be compatible with that of serendipity_event::event_hook()' in /home/content/C/u/t/CuteOtters/html/include/compat.inc.php:118
Stack trace:
#0 /home/content/C/u/t/CuteOtters/html/include/plugin_api.inc.php(580): errorToExceptionHandler('serendipity_eve...', '0', '')
#1 /home/content/C/u/t/CuteOtters/html/include/plugin_api.inc.php(580): serendipity_plugin_api::load_plugin()
#2 /home/content/C/u/t/CuteOtters/html/include/plugin_api.inc.php(992): serendipity_plugin_api::load_plugin()
#3 /home/content/C/u/t/CuteOtters/html/include/plugin_api.inc.php(1041): serendipity_plugin_api::get_event_plugins('backend_login', false, NULL)
#4 /home/content/C/u/t/CuteOtters/html/include/functions_config.inc.php(535): serendipity_plugin_api::hook_event('', '', false, false)
#5 /home/content/C/u/t/CuteOtters/html/include/functions_config.inc.php(380): serendipity_authenticate_author(false)
#6 /home/content in /home/content/C/u/t/CuteOtters/html/include/compat.inc.php on line 118

Re: Upgrade Prob - array_merge()...

Posted: Wed Jun 05, 2013 10:22 pm
by kleinerChemiker
As far, as I remember from other posts, uninstall the browser compatibility plugin. It doesn't work with the 1.7 version.

Re: Upgrade Prob - array_merge()...

Posted: Thu Jun 06, 2013 6:08 am
by petersreviews
kleinerChemiker wrote:As far, as I remember from other posts, uninstall the browser compatibility plugin. It doesn't work with the 1.7 version.
Removing that browser compatibility plugin didn't do anything but thinking about plugins, I started to remove some outdated plugins and now the page loads!!!!
Thank you, thank you, than you for helping me figure this out!

Peter

Re: Upgrade Prob - array_merge()...

Posted: Thu Jun 06, 2013 8:55 am
by Timbalu
Yes, but it must have been definitely the browsercompatibility plugin, missing certain API restrictments. Since this very old core Plugin was anachronistic in these modern times, it got removed while developing 1.7. (But maybe you had more of this kind... but all other Plugins via Spartacus were updated to strictly follow these API principles!)
The debug mode message:
Declaration of serendipity_event_browsercompatibility::event_hook() should be compatible with that of ..., tells you that. This message can not appear in testing or released S9y versions, with production mode true or false, since our error handler would just return.

What we did not know, that this return would follow another error inside Smarty, which could halt the system. I am sorry you were hit by this. We are going to finetune this a little bit more, or remove the return, to see the real error, like above.

Very Cute, these otters!! :wink:

PS. Checking this on some of my systems, I noticed, I - myself! - forgot to remove it out of the plugin list. But this site never errored. So it must also depend on where this Plugin is placed in the list order.

Re: Upgrade Prob - array_merge()...

Posted: Sat Jun 08, 2013 6:09 pm
by garvinhicking
Hi!

For 1.7.1 we should maybe add to the installer functions a process that disables the browsercompatibility plugin automatically? We already have the function to fixup baseURL, so we could use that function as well?!

We could query serendipity_plugins if the plugin is enabled, and if so, set it to hidden, or remove it alltogether?

Regards,
Garvin

Re: Upgrade Prob - array_merge()...

Posted: Sat Jun 08, 2013 6:46 pm
by Timbalu
Fine by me!
But we should really think about removing the return in case of "Declaration..." errors in args as well, since there could be other cases, where it would fall down to a Smarty exception stop, like the one mentioned here, without being verbose enough to be able to quickly fix the main reason, with other Plugins.
Couldn't that be, Garvin?

Re: Upgrade Prob - array_merge()...

Posted: Sun Jun 09, 2013 1:41 pm
by garvinhicking
Hi!

It should be possible without a Smarty exception? The declarations are not that important, it should not stop execution - it's only a deprecated/notice thing..?! Maybe I haven't read what you meant already, I have not read the complete forums by now.

I just committed a patch for this, can somebody please check? Also I saw that there are many entries for fixes in 1.7.1 in docs/NEWS which are not there in 2.0/docs/NEWS - can you check if all is upported?

Regards,
Garvin

Re: Upgrade Prob - array_merge()...

Posted: Sun Jun 09, 2013 2:34 pm
by Timbalu
garvinhicking wrote:It should be possible without a Smarty exception? The declarations are not that important, it should not stop execution - it's only a deprecated/notice thing..?! Maybe I haven't read what you meant already, I have not read the complete forums by now.
The situation was here, that the production mode true ran into a "Declaration of..." error, which got caught by our ErrorHandler and was returned to pass by, to not being mentioned at all. But this triggered a Smarty Exception in follow.(*) Smarty3 has default set using its own Exception Handler. If we do not want this behaviour, we can enable https://github.com/s9y/Serendipity/blob ... c.php#L316 .
(*) Edit: Well, no, it was that upper "array merge" error, which could also have been a serendipity_die() error of our errorHandler, ...I don't really remember... In that case our final finetuning will catch that as not to die, I assume
garvinhicking wrote:I just committed a patch for this, can somebody please check? Also I saw that there are many entries for fixes in 1.7.1 in docs/NEWS which are not there in 2.0/docs/NEWS - can you check if all is upported?
Needs a slight fix, see commit comment.

I think the only one missing until now, was the still unfinished finetune of production mode true (w/o die) Mode.