The Serendipity Handbook

You can now read the (german) handbook here: PDF - https://github.com/s9y/Book (LaTeX source).

Forum-Information

Before posting about errors, make sure that the answer cannot already be found in our FAQ or by searching this forum!
Posting is restricted to registered users (registering is free and simple!) due to recent spam attacks. When having trouble with this board, contact garvin(-at)s9y(-dot)org.

Board index Upcoming Serendipity Features [1.7] Let's get rrready to rrr … elease

Mark threads with "[2.0]" for discussions about features in the longer-term future, "[1.6]" is for short-term. This is not the place for general discussions or plugin or template requests. Only features that are approved to happen by the core team should be listed here for better structuring.
User avatar
Timbalu
Regular
 
Posts: 3876
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Tue Jan 22, 2013 2:09 pm

public s9y wrote:the following error occurs with followed links or page reloads on a local installation (OSX) updated to 1.7rc2, only direct access works well:

Code: Select all
Fatal error: Uncaught exception 'ErrorException' with message 'Serendipity error: stristr(): Empty delimiter' in /Users/me/Sites/serendipity/include/compat.inc.php:119
Stack trace:
#0 [internal function]: errorToExceptionHandler(2, 'stristr(): Empt...', '/Users/me/Sit...', 713, Array)
#1 /Users/me/Sites/serendipity/include/functions.inc.php(713): stristr('http://localhos...', '')
#2 /Users/me/Sites/serendipity/index.php(625): serendipity_track_referrer()
#3 {main}
  thrown in /Users/me/Sites/serendipity/include/compat.inc.php on line 119


For me it does not look like an error produced by the upgrade itself...
Is production = 'debug' enabled?
Could you please tell us which PHP version you are using? Which S9y version was it before?
The errored line in /Users/me/Sites/serendipity/include/functions.inc.php(713) is:
Code: Select all
if (stristr($_SERVER['HTTP_REFERER'], $serendipity['baseURL']) !== false) {

so you have a problem with the $serendipity base url var or the PHP version...

Is the error and possible follow ups gone if you add a @ to stristr like @stristr ?
Regards,
Ian

User avatar
garvinhicking
Core Developer
 
Posts: 29534
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Tue Jan 22, 2013 3:54 pm

Hi!

What I find funny is that stristr() complains about an "Empty delimiter"; but stristr itself is NOT regular expression based, so it should not even have an delimiter! So yes, please tell us your PHP version, also if you have any possible PHP extensions that could overload stristr() [mb does this!]

Googling for this returns: http://stackoverflow.com/questions/3017 ... er-message and this in turn relates to outdated/old PHP versions...

You need at least PHP 5.2.0 to run Serendipity...

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/

public s9y
Regular
 
Posts: 12
Joined: Tue Jan 22, 2013 1:38 pm

Postby public s9y » Tue Jan 22, 2013 5:46 pm

PHP 5.3.15 with mbstring. The former S9Y version was 2.0alpha. I'm running many WebCMSs in different versions on this machine and it's the first time with such an error.
I can do a fresh S9Y installation 'cause it's only for testing purposes.

public s9y
Regular
 
Posts: 12
Joined: Tue Jan 22, 2013 1:38 pm

Postby public s9y » Tue Jan 22, 2013 6:29 pm

So I did a second parallel installation from 1.6.2 to 1.7rc2 and everything works fine.
And when I enable „Autodetect used HTTP-Host = yes“ in my first installation, everything is fine, too.
Thanks for reading and sorry for the inconvenience.

User avatar
garvinhicking
Core Developer
 
Posts: 29534
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Tue Jan 22, 2013 6:44 pm

Hi!

No problem, but I'm really stumped because of the error. PHP 5.3.17 is a bit outdated; I do think it should be related to PHP.

If the other installation works on the same PHP environment, that is all the more strange though...

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/

User avatar
Timbalu
Regular
 
Posts: 3876
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Tue Jan 22, 2013 7:04 pm

garvinhicking wrote:PHP 5.3.17 is a bit outdated;

Come on Garvin,
You can't describe a 4 month old release as really outdated...! :wink:
Release Date was 13-September-2012.

It might still have to do with the PHP version ... or even be something special, downgrading an 2.0-alpha to 1.7 (maybe even something copy&paste releated).

Edit:
Ok, I saw he was talking about 5.3.15 - but this is just 2 month more... 19-July-2012 :)
Regards,
Ian

User avatar
Timbalu
Regular
 
Posts: 3876
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Wed Jan 23, 2013 6:46 pm

Just a note to upgraders from an alpha to the current rc version:
The automatic checksum diagnose function running a complete file md5 sum against the delivered checksum file, may cost some time. Be sure to have set your defaults php.ini max_execution_time = 30 to be some more, like 60 seconds, to avoid calculating runtime errors.
Regards,
Ian

User avatar
rowi
Regular
 
Posts: 70
Joined: Fri Mar 16, 2007 10:10 pm
Location: Flensburg / Germany

Postby rowi » Thu Jan 24, 2013 12:35 pm

Just a quick note: I've just updated to 1.7rc2 coming from 1.6.2 and everything seems to work fine with PHP 5.2 (http://php52.standardleitweg.de/) but not with 5.3 and 5.4: http://php53.standardleitweg.de/ and http://php54.standardleitweg.de/

Edit: seems to be related to the karma plugin, I've deactivated it and now all PHP Versions work fine

Edit2: Microformats and Auto-Title seem to have problems with smarty3, they throw errors at the article preview
Last edited by rowi on Thu Jan 24, 2013 2:08 pm, edited 1 time in total.

User avatar
Timbalu
Regular
 
Posts: 3876
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Thu Jan 24, 2013 2:07 pm

rowi wrote:Edit: seems to be related to the karma plugin, I've deactivated it and now all PHP Versions work fine

Upgraders should note in general to update all currently used additional plugins first!!

PLUGIN NOTICE:
Due to PHP 5.2+'s raised error reporting, every Serendipity event plugin needs to conform to the core plugin API method signature.
All internal and spartacus plugins have been updated to reflect this change. The most important signatures are:
Code: Select all
function uninstall(&$propbag)
function event_hook($event, &$bag, &$eventData, $addData = null)

Older plugins specifically did not always include the $addData signature. Make sure this exists.
If after installation you get uncircumventable errors, you can make sure to set $serendipity['production'] = true; in your serendipity_config_local.inc.php file. This should lower error reporting to a way that will not interfere with incompatible problem. But this is no solution in the long run, you need to update your plugins.

Also, the serendipity_event_browsercompatibility plugin has been removed, because it's functionality was no longer required. You should uninstall that plugin if you are currently using it.

TEMPLATE_NOTICE:
The template file "entries.tpl" needs a specific assignment, to transport the $entry variable to "sub-templates" like comments.tpl and trackbacks.tpl.
All internal and spartacus templates have been updated, so make sure you are using a recent version of your blog's template.
If you have your own custom template, be sure within your {foreach from=$dategroup.entries item="entry"} loop has this line after it:
Code: Select all
{assign var="entry" value=$entry scope="parent"}


Another TEMPLATE_NOTICE:
The old Bulletproof template had a bug, which did not properly set the colorset array in the bulletproof config.inc.php file on changing templates in the backend. If you have an old Bulletproof (based) template running, please change:
Code: Select all
if ($serendipity['GET']['adminModule'] == 'templates') {

to
Code: Select all
if ($serendipity['GET']['adminModule'] == 'templates' || $serendipity['POST']['adminModule'] == 'templates') {
Regards,
Ian

User avatar
rowi
Regular
 
Posts: 70
Joined: Fri Mar 16, 2007 10:10 pm
Location: Flensburg / Germany

Postby rowi » Thu Jan 24, 2013 2:17 pm

Timbalu wrote:
rowi wrote:Edit: seems to be related to the karma plugin, I've deactivated it and now all PHP Versions work fine

Upgraders should note in general to update all currently used additional plugins first!!

I know, Spartacus doesn't show any update. The Karma Plugin is v 2.7 but obviously not listed in spartacus (web) anymore so it might be outdated anyway.

User avatar
Timbalu
Regular
 
Posts: 3876
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Thu Jan 24, 2013 2:19 pm

rowi wrote:Edit2: Microformats and Auto-Title seem to have problems with smarty3, they throw errors at the article preview

What kind of errors? - Please paste error debug output.
Is that because you did not update first or did this happen in their latest version?
Regards,
Ian

User avatar
Timbalu
Regular
 
Posts: 3876
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Thu Jan 24, 2013 2:21 pm

rowi wrote:The Karma Plugin is v 2.7 but obviously not listed in spartacus (web) anymore so it might be outdated anyway.

Karma is a core delivered plugin. Latest version is 2.7.
Regards,
Ian

User avatar
rowi
Regular
 
Posts: 70
Joined: Fri Mar 16, 2007 10:10 pm
Location: Flensburg / Germany

Postby rowi » Thu Jan 24, 2013 2:26 pm

Timbalu wrote:What kind of errors? - Please paste error debug output.
Is that because you did not update first or did this happen in their latest version?


Microformats:
Fatal error: Uncaught exception 'SmartyException' with message 'Plugin tag "microformats_show" already registered' in /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/bundled-libs/Smarty/libs/sysplugins/smarty_internal_templatebase.php:426 Stack trace: #0 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/include/serendipity_smarty_class.inc.php(337): Smarty_Internal_TemplateBase->registerPlugin('function', 'microformats_sh...', 'microformats_se...', true, NULL) #1 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/plugins/serendipity_event_microformats/serendipity_event_microformats.php(245): Serendipity_Smarty->register_function('microformats_sh...', 'microformats_se...') #2 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/include/plugin_api.inc.php(1073): serendipity_event_microformats->event_hook('backend_preview', Object(serendipity_property_bag), Array, NULL) #3 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/include/functions_entries.inc.php(1195): serendipit in /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/bundled-libs/Smarty/libs/sysplugins/smarty_internal_templatebase.php on line 426


Auto-Title:
Fatal error: Uncaught exception 'SmartyException' with message 'Call of unknown method 'get_template_vars'.' in /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/bundled-libs/Smarty/libs/sysplugins/smarty_internal_templatebase.php:806 Stack trace: #0 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/plugins/serendipity_event_autotitle/serendipity_event_autotitle.php(196): Smarty_Internal_TemplateBase->__call('get_template_va...', Array) #1 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/plugins/serendipity_event_autotitle/serendipity_event_autotitle.php(196): Serendipity_Smarty->get_template_vars('head_charset') #2 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/plugins/serendipity_event_autotitle/serendipity_event_autotitle.php(130): serendipity_event_autotitle->autotitle('<a class="seren...') #3 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/include/plugin_api.inc.php(1073): serendipity_event_autotitle->event_hook('frontend_displa...', Object(serendipity_property_bag), in /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/bundled-libs/Smarty/libs/sysplugins/smarty_internal_templatebase.php on line 806


Both are the latest versions from spartacus, I checked for updates prior updating (there were none) and 3mins ago.

User avatar
rowi
Regular
 
Posts: 70
Joined: Fri Mar 16, 2007 10:10 pm
Location: Flensburg / Germany

Postby rowi » Thu Jan 24, 2013 2:30 pm

Timbalu wrote:
rowi wrote:The Karma Plugin is v 2.7 but obviously not listed in spartacus (web) anymore so it might be outdated anyway.

Karma is a core delivered plugin. Latest version is 2.7.

So here's the error I get with PHP 5.3 and 5.4 with Karma enabled:
Fatal error: Uncaught exception 'ErrorException' with message 'Serendipity error: explode() expects parameter 2 to be string, array given' in /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/include/compat.inc.php:119 Stack trace: #0 [internal function]: errorToExceptionHandler(2, 'explode() expec...', '/mounted-storag...', 759, Array) #1 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/plugins/serendipity_event_karma/serendipity_event_karma.php(759): explode('?', Array) #2 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/include/plugin_api.inc.php(1073): serendipity_event_karma->event_hook('frontend_footer', Object(serendipity_property_bag), Array, NULL) #3 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/include/functions_smarty.inc.php(554): serendipity_plugin_api::hook_event('frontend_footer', Array, NULL) #4 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/templates_c/2k11/2d/bf/29/2dbf29645ae0d8b58f296d0ddd34ce7ac09221a3.file.index.tpl.php(191): serendipity_smarty_ho in /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/include/compat.inc.php on line 119

User avatar
Timbalu
Regular
 
Posts: 3876
Joined: Sun May 02, 2004 3:04 pm

Postby Timbalu » Thu Jan 24, 2013 2:34 pm

Can you please do me a favour and check, if

serendipity_event_autotitle.php line 196
Code: Select all
$own_charset = $serendipity['smarty']->get_template_vars('head_charset');

can be used like this
Code: Select all
if (method_exists($serendipity['smarty'], 'get_template_vars')) {
    //handle with Smarty version 2
    $own_charset = $serendipity['smarty']->get_template_vars('head_charset');
} else {
    //handle with Smarty version 3 ...
    $own_charset = $serendipity['smarty']->tpl_vars['head_charset']->value;
}
instead?
Regards,
Ian

PreviousNext


Return to Upcoming Serendipity Features

Who is online

Users browsing this forum: No registered users and 1 guest

cron