You are here:  » No search results in WP


No search results in WP

Submitted by nanaz on Tue, 2014-09-02 11:55 in

Hi David,

I'm having problems with the search results in WP; there are none :-)

The Container Permalink is shop, a page has been created with that name with [pto] in it.
When I use the search form on that page, so at www.mydomain.com/shop, I get a good search result from www.mydomain.com/shop?pto_q=my_searchterm from both the built-in searchform at the top in [pto] and the search widget I use.

But when I navigate the categories, away from www.mydomain.com/shop, and then insert the same searchterm, the form sends me to www.mydomain.com/?s=my_searchterm and there are no results.

I've tried everything I can think of, but I must be missing something. It must be something with the permalink, but I can't figure it out.

Everything else works fine: all shortcodes function and have the desired output. PT & WP are in 1 database with different prefixes. To be sure I uploaded an original unzipped pto folder to the plugins folder of WP, but no change. The standard non-WP PT installation also works fine, including its searchform.

I hope you can point me in the right direction!

Thank you, kind regards,
Marlies

Submitted by support on Tue, 2014-09-02 13:02

Hello Marlies,

It sounds like it is just the Container Permalink setting, which may be empty as it is used as the Action attribute of the search form. If you go to wp-admin > Settings > PriceTapestry.org and edit the Container Permalink and make sure it is set to

/shop

...and save the settings, that should be all it is. If that was already in place correctly, from the same page scroll down to the HTML > Main > Search Form and make sure that it contains %ACTION% as the placeholder for the action attribute for the opening form tag - it should appear as follows:

<form method='GET' action='%ACTION%'>

If that all looks in place, let me know and I'll check it out further with you of course,

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by nanaz on Tue, 2014-09-02 13:48

Hi David,

Thank you for your fast reply!

The Container Permalink was already set at /shop in the PT settings
and this is the code of the search form:

<div style="padding: 12px 0;">
<div class='pto_search_form'>
<form method='GET' action='%ACTION%'>
<input type='text' size='35' name='pto_q' value='%PTO_Q%' />
<input type='submit' value='Search' />
</form>
<br />Search or browse by <a href='%MERCHANTBASEHREF%'>merchant</a>, <a href='%CATEGORYBASEHREF%'>category</a> or <a href='%BRANDBASEHREF%'>brand</a>
</div>
</div>

Cheers, Marlies

Submitted by support on Tue, 2014-09-02 13:54

Hello Marlies,

My apologies - I misread your initial post, and I see now from the URL that it is actually a normal WordPress search that is being submitted (to search posts). There is a "PriceTapestry.org Search" widget that you can add to the required widget area in place of the built in WordPress "Search" widget, and that will submit to the correct URL...

Cheers,
David.
--
PriceTapestry.com

Submitted by nanaz on Tue, 2014-09-02 14:14

Hi David,

Can you hear these faint, eerie noises coming from the Netherlands? That's me, hitting myself over the head for being so terribly, terribly stupid. Will fade quietly into the background for now...

Thank you....

:-)))

Cheers, Marlies

Submitted by bird on Thu, 2014-09-25 08:53

Hi David,

I tried the latest beta of PTO with WP4 and I don't get any results either. I combined several permalinks and search queries but I get no results. The stand alone version of PT is working fine.

WP is located in wp.domain.com, PT is a physical subfolder of WP but located in domain.com - could this cause some problems?

Thank you and best regards!

Submitted by support on Thu, 2014-09-25 09:00

Hello bird,

That layout should be fine - simply make sure that External / Base HREF and Install Path exactly match the values shown on the Support Info page of the associated Price Tapestry installation. However the main thing to confirm is that they are sharing the same database, e.g. DB_NAME, DB_USER and DB_PASS from wp-config.php match $config_databaseName, $config_databaseUsername and $config_databasePassword respectively from config.php of the Price Tapestry installation.

If that appears to be the problem, you can quickly move the database using the Backup and Restore features (Database Tool) - backup with all options selected, edit the database config, re-run setup.php to create the new database and finally restore from the backup XML file generated.

If still no joy, if it would be OK to let me know the installation URL (I'll remove before publishing your reply) I'll check it out further with you of course..

Cheers,
David.
--
PriceTapestry.com

Submitted by Mark Hennessy on Fri, 2014-09-26 09:53

Guys make sure your Shopping page permalink is not changing.

I spent about two days stamping out some sort of bug whereby the Shopping permalink was changing itself to the full edit URL link of the shopping page. Not sure if it's something fishy in Wordpress 4 or some relationship between it and PT.

I was getting no search results because of it although I could still view the products themselves by typing in the full product URL.

Not sure if its your issue as well, but try getting to the full product if possible.