Support Forum

search button doesn't work

EW Erik Wanrooij
Erik Wanrooij
Member

Hm.., I thought we solved the problem with our template/jquery causing buttons not to function. But I just discovered that our search button still doesn’t work.

I’m not good at javascript, but I saw that the button calls the ‘spjValidateSearch’-function, so that may be a good place to start looking. Where do I find that function?

Regards,

Erik

10 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Sorry – can you explain what is happening here exactly? Are you seeing some JavaScript errors in the web console?

EW Erik Wanrooij
Erik Wanrooij
Member

It’s hard to say – it just doesn’t respond when I click the button. When I press <enter>, it works. 

I’ve made one of the forums publicly accessible, to be able to show you what I mean. I send you a PM with the URL, I hope I’m not asking too much..

IK Ike
Ike
Member

Not at all, but could you send the PM to myself as well in case Yellow Swordfish isn’t around? It’s always best to PM all 3 admins here with a link to the support thread included (this thread) to recap the problem.

EW Erik Wanrooij
Erik Wanrooij
Member

Thank you Ike, I just sent you a PM as well..

(Oh, and forgot to add a link to this thread – sorry)

IK Ike
Ike
Member

No problem, it was really for future reference 😉

It is a strange one, it’s definitely not a jquery conflict as the button does in fact work, but it gives me the message at the top ‘Geen zoektekst ingevoerd’ – ‘No search string entered’ once clicked.

Are you getting any errors in either your PHP error log or your SP error log? Best thing to do would be to clear both out, try the search, then go back to see if anything is reported.

EW Erik Wanrooij
Erik Wanrooij
Member

Ok, after I load the forum-page, this error occurs:

file: /simple-press/forum/content/sp-group-view-functions.php
line: 662
function: sp_ForumIndexStatusIcons
Notice | Undefined variable:

 

Howewer when I try to do a search, nothing else is added to the error-list.

EW Erik Wanrooij
Erik Wanrooij
Member

Actually it was a “notice”, not an error. Now I can see another one as well:

 

23/06/2015 16:31 | spaErrNotice | 1 | php

file: /simple-press/admin/panel-options/support/spa-options-prepare.php
line: 30
function: spa_get_global_data
Notice | Undefined index: blockroles

23/06/2015 16:27 | spaErrNotice | 3 | php

file: /simple-press/forum/content/sp-group-view-functions.php
line: 662
function: sp_ForumIndexStatusIcons
Notice | Undefined variable:

IK Ike
Ike
Member

OK Notices can be ignored.. Are you all up to date with SP and WP?

YS Yellow Swordfish
Yellow Swordfish
Member

Well you are probably right that something is happening in the javascript. You will find that routine in simple-press/forum/resources/script/sp-forum.js although there is a ‘dev’ uncompressed version in the same folder.

All it does is make sure there is a value entered and then ensure it exceeds the minimum length for searches which is 4 characters. That script has been in there a long time and as far as we are aware, never caused any problems before.

But it doesn’t seem to be getting passed that hurdle now and at the moment I am beyond puzzled… but am continuing to review.