Support Forum

Profile page. Javascript issues.

LH Lee H
Lee H
Member

If going to the profile page and clicking any button on the left below the tabs everything works as expected. But after that, clicking another button on the left opens the content in a new unstyled page.

On a fresh profile page there is no js errors. But clicking one button, the content loads in the div and then I see a js error:

jQuery(“#spProfileForm”).ajaxForm is not a function

And the url to the source just points to WP’s native jquery.js in the includes folder.

Then… when clicking any button on left the unstyled content opens outside of SP in new window.

Occurring with WP’s twenty-elevin and a un modded default SP theme.

 

Sorry for the vague report….   too much chaos going on around me. I can’t WAIT until the kids are back in school!

17 Answers

New Answer

LH Lee H
Lee H
Member

It seems jquery.form.js is not enqueued as I don’t see it written in the markup. Nor do I see it enqueued in the SP source except for the backend. jquery.forms.js is in my WP includes.

jquery.form.js does show up from within the admin backend.

Of course I could be totally mistaken and it’s not supposed to be loaded?

MP Mr Papa
Mr Papa
Member

I ran into this recently and pulled out my hair for days on this recently…   but my database was in shambles from all the special testing… reverting back to live db from this site and upgrading to 5.0 fixed it…  one other original alpha tester had similar issue but same kind of clean up, I believe… one of the problems with the alpha is if upgrades are needed…  sometimes we fixed earlier upgrades and sometimes add new ones depending on the issue… so its possible to miss upgrades and needed script…  plus, when we go beta, the entire upgrade will change and it may be difficult to keep using the db you have from the alpha…. we is why we keep saying do it only on test site…

but of course, worried none the less…  and now you have it occurring…

so, has it ever worked for you?  has it been like this since you upgraded to 5.0?  or was it working at some point?

CF Conrad_Farlow
Conrad_Farlow
Member

Whenever I open a profile page I get the following warning:

Warning: Missing argument 2 for __sp(), called in /problem-with-post-edit-buttonome/gruzcom1/public_html/ABF_Test/wp-content/plugins/simple-press/forum/content/sp-profile-view-functions.php on line 127 and defined in /problem-with-post-edit-buttonome/gruzcom1/public_html/ABF_Test/wp-content/plugins/simple-press/forum/content/sp-template-control.php on line 324

This is for both standard and full profile pages.

LH Lee H
Lee H
Member

@Mr. Papa…  I normally don’t use SP’s member profile. I only just turned it on a few days ago and noticed the error right away. But I didn’t have time to check it out before reporting.

YS Yellow Swordfish
Yellow Swordfish
Member

Thanks again Conrad. Have opened a ticket for this one.

MP Mr Papa
Mr Papa
Member

Lee, any other sp plugins?  like the pm?  every uninstalled any sp plugins?

for grins, can you go to forum – toolbox – housekeeping and do the reset profile tabs for me and see if that helps?

LH Lee H
Lee H
Member

I disabled all SP and WP plugins (except SP of course) and reset the profile tabs and still have the same behavior. Clicking only one button on right shows content in the container. But I see my javascript error button light up. Then clicking any other button on left pops me out of SP and outputs content right into the browser window.

Can you confirm to me that jquery.forms.js and possibly other friends should be loaded in this section?

MP Mr Papa
Mr Papa
Member

button on the right? assume you mean the menu of the left…

the normal stuff should be loaded, including jquery and jquery forms…

and I think if you look, they will be… however, when ajax is used to load the panel, the DOM has to have the stuff ‘reloaded’…

the behavior you are seeing is the same as I was before I ‘fixed’ my db… spent a good many hours trying to find out what was wrong with no luck… except for one user on day one, no one else has had the issue… with him being day one (and numerous updates/upgrades since) and me having a messed db from specific testing, was hoping it was only an early 5.0 issue…

you seem to have disproved that though 🙁

is this a server on your local machine, or is it net accessible?

LH Lee H
Lee H
Member

Yikes! I didn’t disapprove at all I must of overlooked your suggestion. I’ll see what I can do about the db. It’s a dev one anyway. I just use a copy of it because it’s populated with users, posts, and such.

This dedicated dev server is within my home network and you can get into it if you like. But you’d have to edit your hosts file to spoof the url. And…  I’d have to set up ftp. But not a biggie if you want to play.

jQuery and a long list of jQuery plugins do load. But not jquery.forms

MP Mr Papa
Mr Papa
Member

hmmm… interesting… it should be loading jquery form… but a quick search and I see it only being loaded in the admin… but, seems like that would break it always…

worth a quick check… can you go to sp-forum-framework.php, function sp_load_forum_scripts() and at the bottom of the loading the other jquery stuff, can you add

wp_enqueue_script(‘jquery.form’, SFWPJSCRIPT.’jquery.form.js’, array(‘jquery’), false, $footer);

and see if that helps… obviously not a final implementation, but should get it loaded…

MP Mr Papa
Mr Papa
Member

you might be on to something here… seems its getting loaded for me by theme or other plugin… should be able to test that theory myself…

MP Mr Papa
Mr Papa
Member

OMG… I feel so tiny right now…  confirmed and fix too…  all those hours I wasted Yell

Thanks Lee!

fix coming up…