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
Edit profile ajax sometimes not working
Avatar
Aivars Sterns
Rookie
Free Members
sp_UserOfflineSmall Offline
Sep 26, 2013 - 9:13 am

Hello, 

i've setup simple:press and now tuning it to my needs, all is ok, but sometimes when editing profile and clicking in links Edit Profile, Edit Identities, Edit Avatar, Edit Signature it show page without theme around... checked in firebug and i got 

ReferenceError: jQuery is not defined

 jQuery(document).ready(function() {

where is the problem and how to fix this? you can register and see if needed @url http://tups.lv/udensturisms.lv.....iskusijas/ it's our develompent site... 

every time this happens on third click... dunno if it the problem... also in second click in firebug console i see another js error about checkbox

TypeError: jQuery(...).prettyCheckboxes is not a function

 ...ofileFirst == false) jQuery("input[type=checkbox], input[type=radio]").prettyChe...

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 26, 2013 - 9:59 am

You have a JavaScript conflict - your wp theme or another plugin - which needs to be fixed. This codex article explains what this means and what to look for:

http://codex.simple-press.com/.....-conflict/

I am also seeing a TypeError is the 'fastbutton' script which will also stop other scripts from running...

andy-signature.png
YELLOW
SWORDFISH
Avatar
Aivars Sterns
Rookie
Free Members
sp_UserOfflineSmall Offline
Sep 27, 2013 - 3:52 am

found one place where jquery was called from googleapis, changed to include only wordpress delivered jquery... the same happens... also i can see that it always happens on 3rd request, 2 times i can change profile editing options, third time it's not working... 

on second time in firebug i get this checkboxes error and 3rd time page loads plain ajax request... without theme :(  

dunno where to look anymore...

Avatar
Aivars Sterns
Rookie
Free Members
sp_UserOfflineSmall Offline
Sep 27, 2013 - 3:58 am

found that if i comment out this line:

if (spfProfileFirst == false) jQuery("input[type=checkbox], input[type=radio]").prettyCheckboxes();

 

in file: plugins/simple-press/forum/profile/ahah/sp-ahah-profile.php then all works... 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 27, 2013 - 4:56 am

That sounds like it might be a loading order thing... some of these script combinations can be fairly fragile of course.

if you are happy to do so then you could turn off the checkbox script completely. All it does is change the traditional cherckbox to a graphic. If that would be a suitable answer let me know what SP theme you are using.

Conversely you could always also try changing where the SP scripts load (forum admin > integration > page and permalink... though admittedly that does sound a little like a reload issue as opposed to initial load.

Out of interest - if you go through the same, identical sequence with your profile on this site do you get the same issue?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Aivars Sterns
Rookie
Free Members
sp_UserOfflineSmall Offline
Sep 27, 2013 - 5:47 am

tried every option available on page and permalink page nothing helps. 

i saw that i have already disabled checkbox script with: define('SP_USE_PRETTY_CBOX', false); in theme spFunctions.php

now i switched it on, and all works... 

also in this site clickind edit profile happens some errors, not for third click but in about 6th..

TypeError: p.getElement(...) is null
https://simple-press.com/wp-in.....=358-25336
Line 1

TypeError: this.getDoc(...) is undefined
https://simple-press.com/wp-in.....=358-25336
Line 1

i'm creating own theme based on css only theme...

 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 27, 2013 - 6:58 am

So looks like we may be making a call to load the check-box code when we should not have. Sorry about that. I have already opened a ticket to get this investigated and fixed if needed.

As to this site - there is a still some fragility to loading TinyMCE via an Ajax call. It never used to work at all actually but has improved a lot. I am hoping that Version 4 - when it gets adopted by WP, will improve it even further.

andy-signature.png
YELLOW
SWORDFISH
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