Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Interesting SMILIES_PATH PHP errors in log
Avatar
Dave
Member
sp_UserOfflineSmall Offline
Oct 31, 2014 - 12:51 am

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?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Oct 31, 2014 - 4:01 am

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?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dave
Member
sp_UserOfflineSmall Offline
Oct 31, 2014 - 5:10 am

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.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Oct 31, 2014 - 5:24 am

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Oct 31, 2014 - 5:25 am

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

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dave
Member
sp_UserOfflineSmall Offline
Oct 31, 2014 - 5:28 am

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.

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626