Yes this solves the problem. I guess this distinction between smarty 3 and 2 a lot of problems can be solved.Timbalu wrote:Can you please do me a favour and check, if
serendipity_event_autotitle.php line 196can be used like thisCode: Select all
$own_charset = $serendipity['smarty']->get_template_vars('head_charset');
instead?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; }
[1.7] Let's get rrready to rrr … elease
Re: [1.7] Let's get rrready to rrr … elease
Re: [1.7] Let's get rrready to rrr … elease
Please also check into serendipity_event_microformats.php line 217 and line 245 and replace:rowi wrote:Microformats:Fatal error: Uncaught exception 'SmartyException' with message 'Plugin tag "microformats_show" already registered'
Code: Select all
$serendipity['smarty']->register_function('microformats_show', 'microformats_serendipity_show');
Code: Select all
// For Smarty 2
if (!isset($serendipity['smarty']->_plugins['function']['microformats_show'])) {
$serendipity['smarty']->register_function('microformats_show', 'microformats_serendipity_show');
}
// For Smarty 3
if (!isset($serendipity['smarty']->registered_plugins['function']['microformats_show'])) {
$serendipity['smarty']->register('function', 'microformats_show', 'microformats_serendipity_show');
}
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: [1.7] Let's get rrready to rrr … elease
if the later works we'll change to smarty3 first
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: [1.7] Let's get rrready to rrr … elease
Please try this in serendipity_event_karma.php line 759 and replacerowi wrote: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
Code: Select all
$uri_parts = explode('?', str_replace('&', '&', $eventData));
Code: Select all
$theUri = (string)str_replace('&', '&', $eventData);
$uri_parts = explode('?', $theUri);
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: [1.7] Let's get rrready to rrr … elease
This leads to a different error, basically a php code dumped (http://nopaste.info/ae69f1eadf.html) and this error messages at the end:Timbalu wrote:Please also check into serendipity_event_microformats.php line 217 and line 245 and replace:rowi wrote:Microformats:Fatal error: Uncaught exception 'SmartyException' with message 'Plugin tag "microformats_show" already registered'
Edit: I'm getting this error now with the unmodified version of serendipity_event_microformats.php, too when the plugin is enabled.Fatal error: Uncaught exception 'ErrorException' with message 'Serendipity error: Undefined property: Serendipity_Smarty::$_plugins' in /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/include/compat.inc.php:119
Stack trace:
#0 [internal function]: errorToExceptionHandler('Undefined prope...', 1024)
#1 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/bundled-libs/Smarty/libs/Smarty.class.php(671): trigger_error('_plugins')
#2 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/plugins/serendipity_event_microformats/serendipity_event_microformats.php(252): Smarty->__get('backend_preview', Object(serendipity_property_bag), Array, NULL)
#3 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/include/plugin_api.inc.php(1073): serendipity_event_microformats->event_hook('backend_preview', Array)
#4 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/include/functions_entries.inc.php(1195): serendipity_plugin_api::hook_event(Array, 0, true)
#5 /mounted-storage/home126/sub001/sc73540-KSFN/w in /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/include/compat.inc.php on line 119
Re: [1.7] Let's get rrready to rrr … elease
This works with PHP 5.2, 5.3 and 5.4Timbalu wrote:Please try this in serendipity_event_karma.php line 759 and replacerowi wrote: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' inby thisCode: Select all
$uri_parts = explode('?', str_replace('&', '&', $eventData));
Code: Select all
$theUri = (string)str_replace('&', '&', $eventData); $uri_parts = explode('?', $theUri);
Re: [1.7] Let's get rrready to rrr … elease
Reply to microformat:
Please check if you really have my version with if (!isset(... ) I added a missing ! later on...
the paste tells us that microformats_show function is not smarty registered (at least this is what I expect this bunch to be ).
The karma part is fine and bad at once, since there are a lot of plugins out there not checking the 2cd parameter to be a string. Are you testing with production = debug?
Garvin, what do you think on how to handle this further?
Please check if you really have my version with if (!isset(... ) I added a missing ! later on...
the paste tells us that microformats_show function is not smarty registered (at least this is what I expect this bunch to be ).
The karma part is fine and bad at once, since there are a lot of plugins out there not checking the 2cd parameter to be a string. Are you testing with production = debug?
Garvin, what do you think on how to handle this further?
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: [1.7] Let's get rrready to rrr … elease
I am totally sorry, I have made a mistake. It should be:
in both appearances.
Code: Select all
if( !defined('Smarty::SMARTY_VERSION') ) {
// For Smarty 2
if (!isset($serendipity['smarty']->_plugins['function']['microformats_show'])) {
$serendipity['smarty']->register_function('microformats_show', 'microformats_serendipity_show');
}
} else {
// For Smarty 3
if (!isset($serendipity['smarty']->registered_plugins['function']['microformats_show'])) {
$serendipity['smarty']->registerPlugin('function', 'microformats_show', 'microformats_serendipity_show');
}
}
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: [1.7] Let's get rrready to rrr … elease
Still the PHP dump and the same erro message but with sometimes different line numbers:Timbalu wrote:I am totally sorry, I have made a mistake. It should be:
Regarding your question about production = debug: I haven't changed any setting, just updatedFatal error: Uncaught exception 'ErrorException' with message 'Serendipity error: Undefined property: Serendipity_Smarty::$_plugins' in /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/include/compat.inc.php:119
Stack trace:
#0 [internal function]: errorToExceptionHandler('Undefined prope...', 1024)
#1 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/bundled-libs/Smarty/libs/Smarty.class.php(671): trigger_error('_plugins')
#2 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/plugins/serendipity_event_microformats/serendipity_event_microformats.php(257): Smarty->__get('backend_preview', Object(serendipity_property_bag), Array, NULL)
#3 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/include/plugin_api.inc.php(1073): serendipity_event_microformats->event_hook('backend_preview', Array)
#4 /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/include/functions_entries.inc.php(1195): serendipity_plugin_api::hook_event(Array, 0, true)
#5 /mounted-storage/home126/sub001/sc73540-KSFN/w in /mounted-storage/home126/sub001/sc73540-KSFN/www/stdlw/s9y/include/compat.inc.php on line 119
Re: [1.7] Let's get rrready to rrr … elease
Mmmhh
I did install the plugin now - and I don't really know what to do with it currently - but I don't get any errors, having these two cases including the changed lines:
Where do you get this error?
I did install the plugin now - and I don't really know what to do with it currently - but I don't get any errors, having these two cases including the changed lines:
Code: Select all
case 'genpage':
if (!isset($serendipity['smarty'])) {
serendipity_smarty_init($addData);
}
include_once(dirname(__FILE__).'/smarty.inc.php');
$serendipity['smarty']->assign('subnode', $this->get_config('subnode') ? 1 : 0);
$serendipity['smarty']->assign('best', $this->get_config('best', 5.0));
$serendipity['smarty']->assign('step', $this->get_config('step', 1.0));
$serendipity['smarty']->assign('timezone', $this->get_config('timezone'));
if( !defined('Smarty::SMARTY_VERSION') ) {
// For Smarty 2
if (!isset($serendipity['smarty']->_plugins['function']['microformats_show'])) {
$serendipity['smarty']->register_function('microformats_show', 'microformats_serendipity_show');
}
} else {
// For Smarty 3
if (!isset($serendipity['smarty']->registered_plugins['function']['microformats_show'])) {
$serendipity['smarty']->registerPlugin('function', 'microformats_show', 'microformats_serendipity_show');
}
}
break;
Code: Select all
case 'backend_preview':
// preview works, but content is displayed twice!!
if (is_array($serendipity['POST']['properties']) && count($serendipity['POST']['properties']) > 0){
$parr = array();
$supported_formats = array('hReview', 'hCalendar');
$supported_properties =& $this->getSupportedProperties($supported_formats);
foreach($supported_properties AS $prop_key => $prop_val) {
if (isset($serendipity['POST']['properties'][$prop_key]))
$eventData['properties']['mf_' . $prop_key] = $serendipity['POST']['properties'][$prop_key];
}
}
include_once(dirname(__FILE__).'/smarty.inc.php');
if (!isset($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign('subnode', ($this->get_config('subnode') ? 1 : 0));
if( !defined('Smarty::SMARTY_VERSION') ) {
// For Smarty 2
if (!isset($serendipity['smarty']->_plugins['function']['microformats_show'])) {
$serendipity['smarty']->register_function('microformats_show', 'microformats_serendipity_show');
}
} else {
// For Smarty 3
if (!isset($serendipity['smarty']->registered_plugins['function']['microformats_show'])) {
$serendipity['smarty']->registerPlugin('function', 'microformats_show', 'microformats_serendipity_show');
}
}
break;
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: [1.7] Let's get rrready to rrr … elease
I must make a mistake before when changing the lines, if I use your larger block everything looks fine.Timbalu wrote:Mmmhh
I did install the plugin now - and I don't really know what to do with it currently - but I don't get any errors, having these two cases including the changed lines:
Thanks for your help!
Re: [1.7] Let's get rrready to rrr … elease
Thank you for testing!!!rowi wrote:Thanks for your help!
Please find more of those... (if any)!
Edit:
The issue changes have found their way into additional_plugins - available via spartacus tomorrow and into our serendipity backward compatibility smarty class, which should cover all possible plugin errors of Uncaught exception 'SmartyException' with message 'Call of unknown method 'get_template_vars' in some more plugins. If you discover this error with the RC-2 and some special plugins, you need to wait for the next candidate or copy a fresh file from our gitHub repository https://raw.github.com/s9y/Serendipity/ ... ss.inc.php.
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: [1.7] Let's get rrready to rrr … elease
Coming from S9Y 1.6.2 with PHP 5.2.17 everythings is fine with 1.7RC2. Thanks.
Re: [1.7] Let's get rrready to rrr … elease
Just to note:
I can not reach him to solve that error, but it looks like, that if needle - in this case $serendipity['baseURL'] - is empty, the warning message is an "empty delimiter" error. It seems strange how this blog has worked before...?
So please make sure you have set your Backend - configuration -> path - URL to blog, to reflect your site Url path: e.g. http://domain.com/path2S9y/
I do have some one here (possibly on all-inkl-com) with PHP 5.2.12-nmm4, who gets this stristr empty delimiter warning too. I send a PM some time ago without success to check if this is a buggy PHP version or the stristr key itself. (Debug args say: [autodetect_baseURL] => and [baseURL] => ).Timbalu wrote:[...] you have a problem with the $serendipity baseURL var or the PHP version...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
garvinhicking wrote: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!] [...]
You need at least PHP 5.2.0 to run Serendipity...public s9y wrote: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.[...]
I can not reach him to solve that error, but it looks like, that if needle - in this case $serendipity['baseURL'] - is empty, the warning message is an "empty delimiter" error. It seems strange how this blog has worked before...?
So please make sure you have set your Backend - configuration -> path - URL to blog, to reflect your site Url path: e.g. http://domain.com/path2S9y/
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
-
- Regular
- Posts: 12
- Joined: Tue Jan 22, 2013 12:38 pm
Re: [1.7] Let's get rrready to rrr … elease
I just took a look and it was empty indeed, but I don't know why. I set it with my path, set „Autodetect used HTTP-Host = no“ and everything is ok.Timbalu wrote:So please make sure you have set your Backend - configuration -> path - URL to blog, to reflect your site Url path: e.g. http://domain.com/path2S9y/