Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-03-17 03:27:31

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,188
Website

Error messages in the admin backend (r5418 ?)

@revision 5434, Site status is set to ‘debugging’

Write pane, while saving an old article (—> any action I might take)
the article contains Textile footnotes. Article is saved correctly, though.

Notice "Undefined index: note1"
in /path/to/textpattern/lib/classTextile.php at line 2170.
textpattern/lib/classTextile.php:2170 adminErrorHandler()
Textile->fParseNoteRefs()
textpattern/lib/classTextile.php:2154 preg_replace_callback()
textpattern/lib/classTextile.php:1914 Textile->noteRefs()
textpattern/lib/classTextile.php:1837 Textile->graf()

followed by

Notice "Undefined index: id"
in /path/to/textpattern/lib/classTextile.php at line 2181.
textpattern/lib/classTextile.php:2181 adminErrorHandler()
Textile->fParseNoteRefs()
textpattern/lib/classTextile.php:2154 preg_replace_callback()
textpattern/lib/classTextile.php:1914 Textile->noteRefs()
textpattern/lib/classTextile.php:1837 Textile->graf()

repeat this for the number of footnotes in the article.


Article pane: when searching for articles (footnote is what I input in the search field, drop down widget is set to ‘Title, Body & Excerpt’)

Notice "Undefined index: footnote"
in /path/to/textpattern/include/txp_list.php at line 172.

and (backtrace)

textpattern/include/txp_list.php:172 adminErrorHandler()
textpattern/include/txp_list.php:66 list_list()
textpattern/index.php:231 include()


I’ve reproduce this on a clean, new install. Setting site status to ‘testing’ or ‘live’ hides (or suppresses) the errors – as expected, I think, if I understood Gocom’s latest chickens correctly.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#2 2013-03-17 09:19:40

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Error messages in the admin backend (r5418 ?)

Those errors have always been there, to be fair. It’s just that I set the error handler to show everything in debugging mode. Some of the libraries we use, have taken the practice to use error suppression as a feature. For instance, PHPass and Textile may generate some notices. Nothing major, but instead of doing checks they suppress errors to have shorter code and stuff.

Anyways, displaying suppressed errors was a mistake. It wasn’t supposed to happen. For some reason I forgot condition from the code, which I then copy pasted to all the error handlers. It’s now there, and it should not show suppressed errors.

Offline

#3 2013-03-17 09:40:01

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,188
Website

Re: Error messages in the admin backend (r5418 ?)

Gocom wrote:

Those errors have always been there, to be fair.

I suspected as much but what do I know… I’m certainly not the resident PHP guru :-)

Anyways, displaying suppressed errors was a mistake. It wasn’t supposed to happen. For some reason I forgot condition from the code, which I then copy pasted to all the error handlers. It’s now there, and it should not show suppressed errors.

Cool, revision 5435 makes it all ‘error free’ again ! Thanks.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

Board footer

Powered by FluxBB