Support Forum

Custom smilies not working after forum upgrade

DO doctorb
doctorb
Member

I recently upgraded the forum to the latest build.

I had added some custom smilies long back and they were working well but after the upgrade, the smilies are not working.

I can see them below the add post window but nothing happens on clicking them.

The error log is showing the following error

 

file: /simple-press/forum/content/forms/sp-form-components.php
line: 469
function: sp_post_editor_smileys_options
Notice | Trying to get property of non-object

 

And if I add the code of a smiley to a post, it comes up fine.

http://forum.hpathy.com/

 

13 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

The notice you have been receiving is a nuisance but actually is a red-herring and, in this case, a coincidence. it has been cleaned up ready for the next update but it wont affect this issue.

And this is the first such report and i can say test show not a common problem. SO – a question. If you go to the Smileys admin panel under Components – are all the items of data for your custom smileys filled in? And no duplicate codes or names?

If all looks well would it be possible for to have a look on your site so I can see them for myself and look under the hood at the code? It means I would need to ask you to create an account who can make posts. If this is OK then can you please PM credentials to both myself and to ‘Mr Papa’. Please include in the PM a link to your site, a link to this thread and brief reminder of the problem. And one of us will take a look for you.

DO doctorb
doctorb
Member

If you go to the Smileys admin panel under Components – are all the items of data for your custom smileys filled in?

YES

And no duplicate codes or names?

NO

 

I am sending the login details in a PM

YS Yellow Swordfish
Yellow Swordfish
Member

Might it be that the use of ArrowChat also started around the time of the forum update? ArrowChat – which is a new one on me by the way – is breaking all the WordPress API rules and loading itls own jQuery and jQuery UI libraries. Could you possibly just deactivate it for a short while and then try (a) the use of the tinyMCE editor and (b) the smileys…

DO doctorb
doctorb
Member

I’ll do that but we have been using arrowchat since last several years and earlier it was not giving any problems with simple press.

DO doctorb
doctorb
Member

To test I changed the theme to 2013, which did not have any custom code and did not load arrowchat also. The html editor in reply window and the smilies still do not work!

DO doctorb
doctorb
Member

I see one more error in the error log

 

file: /simple-press/sp-api/sp-api-filters.php
line: 1744
function: htmlspecialchars
Warning | htmlspecialchars() [function.htmlspecialchars]: Invalid multibyte sequence in argument

 

if it is of any help.

DO doctorb
doctorb
Member

I did a reinstall and that also did not help.

 

Then I realized that I had recently added some more plugins to my simple press install. Disabled all of them and the html editor and smilies worked.

 

Switching them on one by one led to the culprit – it is the Mentions plugin of simple press that is breaking the things. Disabled it and all works well. Please look into the Mentions plugin and why it is breaking the other things.

MP Mr Papa
Mr Papa
Member

we dont have a general problem with mentions and smileys… works fine for me in couple quick tests…

so think we need some more info as to what might be going on locally…

latest version of SP and tinymce plugin?

with the console of your browser open, any errors popup when you click on the smiley?

a likely cause here is that you are serving cached pages

<!– Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk: enhanced
Database Caching 4/61 queries in 0.020 seconds using disk
Object Caching 1381/1389 objects using disk
Content Delivery Network via cd1.hpathy.com

 Served from: forum.hpathy.com @ 2013-09-10 13:18:30 by W3 Total Cache –>

including minified js which tends to fail with sp js because it was already minified to begin with…  the forum content is dynamic as all forum content appears on a single wp page…

so you cannot cache it (we do internal caching)…  you must tell your caching plugin to ignore the wp page the forum is on for all types of caching (each type has its own exclusion list)…

DO doctorb
doctorb
Member

Disabled all minification and cache except cdn.

cleared cache

enabled mentions

and the html 5 editor and smilies break again.

DO doctorb
doctorb
Member

Latest build of tiny and SP.

 

Firebug shows these errors

Error 1

“NetworkError: 404 Not Found – http://forum.hpathy.com/wp-includes/js/tinymce/plugins/a/editor_plugin.js?ver=358-24485”

 

Error 2

 

TypeError: this.getDoc(…) is undefined

http://cd1.hpathy.com/wp-includes/js/tinymce/tiny_mce.js?ver=358-24485

 

DO doctorb
doctorb
Member

I dont know what was happening but I reinstalled TonyMCE and now everything seems to be working alright.

 

Thanks!

MP Mr Papa
Mr Papa
Member

tried to use the credentials you sent but couldnt log in with them…

couple other ideas…

first, since things have changed with disabling caching, please go to forum – toolbox – housekeeping and clear the combined js scripts…   might help but doubt it – worth a try…

other one is does  your wp theme add anything to tinymce?  buttons or other?  if so, it might be doing it incorrectly… many wp themes (and plugins) assume the wp editor is only used on the admin side…  but the wp api fully supports it being used on the front end too – as simple press does…  so that may be causing issues too, but need to see the actual tinymce init to see…