Advertisement:

Author Topic: Error search - missing text with highlight in URL  (Read 467 times)

Offline Stirius

  • Semi-Newbie
  • *
  • Posts: 56
Error search - missing text with highlight in URL
« on: April 07, 2020, 10:02:55 AM »
Hello,

we have some issues with our search. Using version 2.0.17. If you search for something, it shows up correctly. But when you then click and go to the URL itself, there is no text at all. See the attached files.

The URL stays as https://www.boiians.cz/index.php?topic=558.msg9265;highlight=new+world#msg9265 but if we use just simple https://www.boiians.cz/index.php?topic=558.msg9265 then it's working fine. But going to the topic via the search then it's simple empty.

Do you know where could be the problem?

Thank you.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,218
  • Gender: Male
    • Kindred-999 on GitHub
Re: Error search - missing text with highlight in URL
« Reply #1 on: April 08, 2020, 03:07:38 PM »
since your site is locked out for guests, I can't check....
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Stirius

  • Semi-Newbie
  • *
  • Posts: 56
Re: Error search - missing text with highlight in URL
« Reply #2 on: April 08, 2020, 03:42:17 PM »
since your site is locked out for guests, I can't check....

What do you mean locked, it is easily accessible for everyone. Just outside our countries you must prove that you are a human (we had a lot of bots). I just changed it to a javascript check which is easier to pass...

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,218
  • Gender: Male
    • Kindred-999 on GitHub
Re: Error search - missing text with highlight in URL
« Reply #3 on: April 08, 2020, 04:30:18 PM »
Well, that was annoying but passable...  but no...  I tried to go to the page that you linked and was told that I had to be a member to see it...
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,467
  • Gender: Male
    • i30 Owners Club
Re: Error search - missing text with highlight in URL
« Reply #4 on: April 08, 2020, 04:31:12 PM »
What do you mean locked, it is easily accessible for everyone.

No it isn't

Quote
The topic or discussion you are looking for is either missing or out of your range.


Please provide a test username & password.

Offline Stirius

  • Semi-Newbie
  • *
  • Posts: 56
Re: Error search - missing text with highlight in URL
« Reply #5 on: April 08, 2020, 04:37:07 PM »
Could you please provide me a screenshot of what you see? Is it cloudflare or something else? Ok, I just switched it off. And, I am using a US proxy, I can easily go here https://www.boiians.cz/ and then you just write whatever to the search box at the top right corner. For example New World. You do not have to be signed in. Then it gets me to https://www.boiians.cz/index.php?action=search2 where I can see the topics. Then I click any of the topics and get inside just to see missing text in all posts...

Thanks a lot.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,467
  • Gender: Male
    • i30 Owners Club
Re: Error search - missing text with highlight in URL
« Reply #6 on: April 08, 2020, 04:48:54 PM »

Offline Stirius

  • Semi-Newbie
  • *
  • Posts: 56
Re: Error search - missing text with highlight in URL
« Reply #7 on: April 10, 2020, 06:04:31 AM »
Where do you see this? If you follow my guidelines above then you should easily search for whatever you want. There you wanted to go to a topic which is not for guests... You can just go here to see the bug https://www.boiians.cz/index.php?topic=725.msg19033;highlight=new+world#msg19033

You can click on the search results like attached. Those are free for all.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,218
  • Gender: Male
    • Kindred-999 on GitHub
Re: Error search - missing text with highlight in URL
« Reply #8 on: April 10, 2020, 09:34:52 AM »
well that was the topic that you gave us a link to... :P

As for your problem...    you have bad code in there somewhere.
The search return is basically causing the contents of each post to not display.


Does this happen if you switch to the default theme?
If not, please attach your theme's post.template.php.
If so, then please attach Post.php from your sources directory
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Stirius

  • Semi-Newbie
  • *
  • Posts: 56
Re: Error search - missing text with highlight in URL
« Reply #9 on: April 10, 2020, 09:52:47 AM »
Ah, okey, sorry then. Yes, even default template is buggy. Attaching the file.

Offline Stirius

  • Semi-Newbie
  • *
  • Posts: 56
Re: Error search - missing text with highlight in URL
« Reply #10 on: April 15, 2020, 07:29:46 AM »
well that was the topic that you gave us a link to... :P

As for your problem...    you have bad code in there somewhere.
The search return is basically causing the contents of each post to not display.


Does this happen if you switch to the default theme?
If not, please attach your theme's post.template.php.
If so, then please attach Post.php from your sources directory

Hello @kindred

Were you able to check the file?

Thank you!

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,218
  • Gender: Male
    • Kindred-999 on GitHub
Re: Error search - missing text with highlight in URL
« Reply #11 on: April 15, 2020, 01:51:19 PM »
Sorry. work got crazy.
ok....  I don't see anything obvious in that file....
Although I do see a potential security issue in that you do not trim html from iframes, blockquotes and embeds...     That's a difference for the default, and not something that I'd recommend -- but not likely to be the issue here



........   and..... I just realized that I asked about the wrong file.

let's try Search.php

because, the search results actually do NOT return the correct data in the first place.


Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Stirius

  • Semi-Newbie
  • *
  • Posts: 56
Re: Error search - missing text with highlight in URL
« Reply #12 on: April 15, 2020, 03:39:15 PM »
Sorry. work got crazy.
ok....  I don't see anything obvious in that file....
Although I do see a potential security issue in that you do not trim html from iframes, blockquotes and embeds...     That's a difference for the default, and not something that I'd recommend -- but not likely to be the issue here



........   and..... I just realized that I asked about the wrong file.

let's try Search.php

because, the search results actually do NOT return the correct data in the first place.

I see.

Ok, here you go.

Offline Stirius

  • Semi-Newbie
  • *
  • Posts: 56
Re: Error search - missing text with highlight in URL
« Reply #13 on: April 20, 2020, 05:59:55 PM »
Hi Kindred, have you got time yet to check the file please?

Thanks!

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,218
  • Gender: Male
    • Kindred-999 on GitHub
Re: Error search - missing text with highlight in URL
« Reply #14 on: April 21, 2020, 12:28:42 PM »
ok, looks like the problem is your "highlight Search keywords" mod (although the member color search may be the interference)

Not sure how to fix it, exactly... but that is almost definitely the code that is breaking the display.

remove those two mods... confirm that the functionality works and then try installing the mods one at a time, testing between....

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Stirius

  • Semi-Newbie
  • *
  • Posts: 56
Re: Error search - missing text with highlight in URL
« Reply #15 on: April 21, 2020, 04:14:38 PM »
Jesus christe, you are right, it was just because of that mod... Lol, thanks a lot. I don't know why I didn't try to disable them...  ???