Page 1 of 1

s9y 1.7.5: s9y/textile crashes

Posted: Wed Jan 29, 2014 5:34 pm
by bernd_d
After updating from 1.7.3 to 1.7.5 my s9y didn't come up anymore.

error.log says:

Code: Select all

mod_fcgid: stderr: PHP Fatal error:  Call to a member function textileThis() on a non-object in ./plugins/serendipity_event_textile/serendipity_event_textile.php on line 282
event_textile 1.8.1
textile v3

If i set textile to v2, s9y comes up again.

Re: s9y 1.7.5: s9y/textile crashes

Posted: Wed Jan 29, 2014 7:51 pm
by Timbalu
Very strange since you are using PHP 5.3.10.

Does that behave differently being mod_fcgid?

How did you set textile back to v2 while having a fatal error?

Re: s9y 1.7.5: s9y/textile crashes

Posted: Wed Jan 29, 2014 8:21 pm
by bernd_d
Timbalu wrote:Very strange since you are using PHP 5.3.10.

Does that behave differently being mod_fcgid?
Don't know why it crashes. With 1.7.3 until now i had our testing version from the other topic. Thought, this is the same one like in 1.7.5. :|
Timbalu wrote:How did you set textile back to v2 while having a fatal error?
I just logged in into backend and changed it back to v2. ;)

Re: s9y 1.7.5: s9y/textile crashes

Posted: Thu Jan 30, 2014 3:37 pm
by Timbalu
What happens when you move this line in question into the include file 'textile_namespace.inc.php', or put an

Code: Select all

if (is_object($textile)) return ...
in front?

Re: s9y 1.7.5: s9y/textile crashes

Posted: Thu Jan 30, 2014 7:52 pm
by bernd_d
Timbalu wrote:put an

Code: Select all

if (is_object($textile)) return ...
in front?
Seems to work with this if in front. But why didn't this happen in our tests before and occurs now after updating s9y? Have there been this if to?

Re: s9y 1.7.5: s9y/textile crashes

Posted: Thu Jan 30, 2014 8:24 pm
by Timbalu
While we had to move the object loader to an include file, for PHP 5.2 compat isues. (see * note some posts down)

So I will commit this if (is_object($textile)) return ... then - Thanks for testing!
(I am on moduled apache and PHP 5.4.x and I don't have that issue.)

Re: s9y 1.7.5: s9y/textile crashes

Posted: Fri Jan 31, 2014 8:41 am
by bernd_d
@Timbalu: There seems to be some other problems... :shock:

If i set textile to V3, there is no content for entries sumary, as you can see here:
frontpage_textile_v3.png
frontpage_textile_v3.png (36.19 KiB) Viewed 9949 times
If i set textile back to V2, everything is fine again:
frontpage_textile_v2.png
frontpage_textile_v2.png (255.84 KiB) Viewed 9949 times

It seems, it doesn't especially have to do with youtoube-videos. Some content with videos is shown, other content without videos is not parsed. error_log doesn't show any errors.

Re: s9y 1.7.5: s9y/textile crashes

Posted: Fri Jan 31, 2014 10:34 am
by Timbalu
No idea. Is there any changed syntax?
But usually this should not empty a text part, then just throw some weird regex translations.
(It could be some sort of cache issue. Try to recompile...)

Re: s9y 1.7.5: s9y/textile crashes

Posted: Fri Jan 31, 2014 11:54 am
by bernd_d
Timbalu wrote:No idea. Is there any changed syntax?
But usually this should not empty a text part, then just throw some weird regex translations.
(It could be some sort of cache issue. Try to recompile...)
templates_c is emty and other cache is not used.

As you can see on my weblog within overview there is no content generated for diferent entries, only header and footer. If you go into single view (for example this one), content is shown as it sould.

Re: s9y 1.7.5: s9y/textile crashes

Posted: Fri Jan 31, 2014 12:32 pm
by Timbalu
Hm, strange!
I don't understand, why it does work on some entries and not with others, like you said.
Else I would say, the include namespace file is not correctly working in your case and since you check by is_object(), nothing is forwarded to the frontend.

Please try to remove the "_once" in include_once.

Re: s9y 1.7.5: s9y/textile crashes

Posted: Fri Jan 31, 2014 12:50 pm
by bernd_d
Timbalu wrote:Please try to remove the "_once" in include_once.
I changed line 279 to

Code: Select all

include 'textile_namespace.inc.php'; 
and now, content is shown again on frontpage. :)

Re: s9y 1.7.5: s9y/textile crashes

Posted: Fri Jan 31, 2014 1:35 pm
by Timbalu
Gnrrrr ;-) and you still need the is_object()?
Thank you!

Re: s9y 1.7.5: s9y/textile crashes

Posted: Fri Jan 31, 2014 1:49 pm
by bernd_d
Timbalu wrote:Gnrrrr ;-) and you still need the is_object()?
Thank you!
Hmmmm: No. Seems, with removing _once, i also don't need "is_object()".

Current code is

Code: Select all

include 'textile_namespace.inc.php'; // PHP 5.2 compat
// todo check for user-supplied output to restrict
#    return $textile->textileRestricted($string);
return $textile->textileThis($string);

Re: s9y 1.7.5: s9y/textile crashes

Posted: Fri Jan 31, 2014 2:04 pm
by Timbalu
Ok! I still leave it, even if not really needed - commited!
This will be fixed (*) in upcoming 1.7.6.

(*) Why we had this issue? Please read: http://board.s9y.org/viewtopic.php?f=3&t=19685
I was told, it does not error any further. Sorry for this.