Support Forum

Interesting SMILIES_PATH PHP errors in log

DA Dave
Dave
Member

My error log is full of the errors similar to this:

[30-Oct-2014 12:16:55 America/xxxxxx/xxxxxx] PHP Warning – getimagesize(/problem-with-post-edit-buttonome/xxxxxx/public_html{SMILIES_PATH}/emoticon-0105-wink.gif): failed to open stream: No such file or directory – file: /simple-press/sp-api/sp-api-filters.php – line: 2069 – function: getimagesize

I’m a bit confused as the directory path looks out of place (public_html{SMILIES_PATH}).

Shouldn’t the path be public_htmlwp-contentsp-resourcesforum-smileys? Am I missing something? Maybe I missed the sp-api-filters.php file during an upgrage?

5 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Most curious. the constant ‘SMILIES_PATH’ is not one of ours – Simple:Press that is – nor is it a WordPress constant. What other plugins, add-ons etc., to you have active that might be providing it?

DA Dave
Dave
Member

None that I can think of. There are quite a few plugins but all are for functional purposes, not adding smiley faces!

I did an html search of the site and the only mention of “smilies” is in /wp-includes/formatting.php. Searching for {smilies_path} in the database returns results in _sferrorlog and _sfposts… Hmmmm. I think I just figured it out!

The board was originally PHPBB and I used the SP importer, so I’m guessing this is the smiles path for PHPBB that was imported directly.

Yep, that’s it! Looking at one of the results in the sfposts table I see [Image Can Not Be Found] in the actual post content. Editing 2500 posts is going to suck. I guess I’m lucking it’s only 2500.

Anyway to update the importer so that code isn’t parsed or imported? I would hate for someone else to have to go through the process.

YS Yellow Swordfish
Yellow Swordfish
Member

Ah – is that how they do it. I didn’t know that. perhaps we could consider introducing some exceptions for the import.

you could place the forum in maintenance mode (we have a plugin for this). Then export the ‘sfposts’ table to a SQL dump file. Edit it using a plain text editor – i.e., search and replace perhaps. And then import it back to your database. As long as you make a decent backup before you start and nobody makes any changes within the forum then that should work out.

YS Yellow Swordfish
Yellow Swordfish
Member

Or…. we could probably fix you up with a simple filter to remove that at runtime so it just displays the content without it… 

DA Dave
Dave
Member

I appreciate that, but I’d rather (at the least) find/replace in the DB so I don’t have any oddball changes to core to remember further on down the road.