Forums › Forums › Search & Filter Pro › Extra space in search results
- This topic has 22 replies, 3 voices, and was last updated 8 years, 2 months ago by Trevor.
-
Trevor(Private) September 12, 2016 at 4:49 pm #57456
This post was originally caused by the incorrect end tags for paragraphs. That was all it was, and it was fixed. It did somehow creep back in again, but with 2.2.0 we again fixed it. No other spacing issues were observed.
What I see happening is this. In your results.php file you have code like this (simplified by me!!):
<div>blah foo</div> <!--end details--> <div>blah foo</div>
And the browser is receiving this:
<div>blah foo</div> <p><!--end details--> <div>blah foo</div>
Somehow the start <p> is added and without an end to it. And then mayhem follows as this cascade impacts on anything that follows on the page.
Our plugin only uses a standard PHP include to bring the results.php in with, so it would not do that. However, WordPress, a plugin, or even your theme may be doing it.
Ross Moderator(Private) September 12, 2016 at 5:55 pm #57480Hi Melinda
S&F creator here..
I’ve just seen you’ve left a bad review… Not good to hear 🙁
Can I try to help you get setup?
The confusion here is that, S&F does not do any parsing of the template file – so S&F does not have any function that could or would add
<p>
tags.So your results.php, will be read in exactly as it is…
As you’re the only person reporting this issue I have to assume something in your setup is causing the results file to be parsed in this way on initial page load.
You also mention that when using Ajax the
<p>
tags disappear – this to me says that when an ajax request is performed, that S&F gets the clean html (before some other strange parsing has occurred) and displays the results as they should be – as in, it leads me to believe that somethign in your setup is parsing the PHP file an extra time, and converting line breaks in to<p>
tags..If you want to try to resolve the issue (and I am keen to know the cause) I would recommend creating a temporary user for us to login and have a quick look around.
I would also suggest (yes its annoying) but to disable other plugins that are active, if you want I can do this for you?
Best
Anonymous(Private) September 12, 2016 at 5:59 pm #57486Did you look at your plugin structure? Did you look at the code I sent of my template and the results being returned? None of my other templates are adding extra paragraph and break tags. As it is, the only fix I have is to add CSS classes to the paragraphs I want to display and hide the rest on your results page. That is a total hack required because of the terrible code written by your plugin. FYI, the comments are only ONE of the places where extra tags are being added so your suggestion is useless.
Ross Moderator(Private) September 12, 2016 at 6:08 pm #57488Melinda,
Of course I have had a look, and you illustrate the issue fine – I can see it also being present on the dev site – so I have taken what you’ve written in to consideration but cannot guess from that, what your issue may be.
When you place a shortcode on the page for results, S&F simply does a PHP
include
for the results template.This is a native PHP function, and reads in a file. Now for some reason, in your particular setup,
<p>
tags are getting added everywhere.Because S&F uses a really basic PHP function to include the file, I’m guessing there is a conflict with another plugin in your setup.
As I mentioned above, I will need to look in to the issue in order to resolve it – do you want me to do that?
If so, we need to do my two suggestions – please provide temporary login details if you wish to proceed.
Thanks
Ross Moderator(Private) September 12, 2016 at 6:09 pm #57490Just to add, a very quick test locally using this in my results.php
<!-- this is some kind of comment -->a <!-- this is some kind of comment -->b <!-- this is some kind of comment -->c <!-- this is some kind of comment -->d
Results in the following output, as expected:
a b c d
Anonymous(Private) September 12, 2016 at 6:10 pm #57492Ross, your org already has a user account set up to fix your plugin on our site. We have been working with you for several weeks to get your plugin to work correctly. This is only one of the issues we’ve had with this plugin. Half the time, there are no results and you can’t use the reset button. The search forms themselves do not always save.
If you want to look at our dashboard to troubleshoot, this afternoon is the only time possible.
Ross Moderator(Private) September 12, 2016 at 6:26 pm #57494This reply has been marked as private. -
AuthorPosts