Upgrade Prob - array_merge()...

Having trouble installing serendipity?
Post Reply
petersreviews
Regular
Posts: 28
Joined: Thu Oct 27, 2005 7:51 pm
Location: Sunny California
Contact:

Upgrade Prob - array_merge()...

Post 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
Please take a minute to visit my web site: http://www.petersreviews.com
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Upgrade Prob - array_merge()...

Post 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?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
petersreviews
Regular
Posts: 28
Joined: Thu Oct 27, 2005 7:51 pm
Location: Sunny California
Contact:

Re: Upgrade Prob - array_merge()...

Post 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
Please take a minute to visit my web site: http://www.petersreviews.com
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Upgrade Prob - array_merge()...

Post 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?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
petersreviews
Regular
Posts: 28
Joined: Thu Oct 27, 2005 7:51 pm
Location: Sunny California
Contact:

Re: Upgrade Prob - array_merge()...

Post 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.
Please take a minute to visit my web site: http://www.petersreviews.com
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Upgrade Prob - array_merge()...

Post 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.)
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
petersreviews
Regular
Posts: 28
Joined: Thu Oct 27, 2005 7:51 pm
Location: Sunny California
Contact:

Re: Upgrade Prob - array_merge()...

Post 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
Please take a minute to visit my web site: http://www.petersreviews.com
kleinerChemiker
Regular
Posts: 765
Joined: Tue Oct 17, 2006 2:36 pm
Location: Vienna/Austria
Contact:

Re: Upgrade Prob - array_merge()...

Post by kleinerChemiker »

As far, as I remember from other posts, uninstall the browser compatibility plugin. It doesn't work with the 1.7 version.
petersreviews
Regular
Posts: 28
Joined: Thu Oct 27, 2005 7:51 pm
Location: Sunny California
Contact:

Re: Upgrade Prob - array_merge()...

Post 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
Please take a minute to visit my web site: http://www.petersreviews.com
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Upgrade Prob - array_merge()...

Post 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.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Upgrade Prob - array_merge()...

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Upgrade Prob - array_merge()...

Post 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?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Upgrade Prob - array_merge()...

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Upgrade Prob - array_merge()...

Post 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.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply