Join our new community forum for support & discussion
Join NowHome › Support › Extensions › Search Alerts › Wrong url to monitored searches
Wrong url to monitored searches
-
AuthorPosts
-
Hemligg 1 year, 6 months ago
We have purchased the search alerts extension and we have integrated it into our solution. But it doesn’t quite work as expected since we get wrong url in the alert emails and the url you get for the alerted searches on the page where you list the search alerts you have set.
We get this url:
https://ourdomain.se/?_category=5391&fler_onskemal%5B0%5D=5430&onskemal%5B0%5D=5427&post_type=hp_listing&var%5B0%5D=5402&var%5B1%5D=5409&s
instead of this
https://ourdomain.se/blogg/listing/?_category=5391&fler_onskemal%5B0%5D=5430&onskemal%5B0%5D=5427&post_type=hp_listing&var%5B0%5D=5402&var%5B1%5D=5409&s
The latter url will display the listings filtered by the filters set in the search alert. The first url will display all listings although the filter will be preset.“blogg” is the “Posts page” as set in the general wordpress settings
“listing” is something from Hivepress?Here is a screenshot of where you find the issue.
https://user-images.githubusercontent.com/46832636/142426892-da00ed99-dc44-4e01-bc27-4c096e1caf0f.pngThanks for the details. This is strange, both URLs have the same query parameters (used for searching listings), but the base URL is incorrect, please make sure that the website URL is set correctly in Settings/General section. You can also check the permalink structure in Settings/Permalinks, maybe this “/blogg” prefix is set there?
Hemligg 1 year, 5 months agoBack again. This is still an issue. “/blogg” was included in the permalink and we had a redirection rule that redirected to that url. So that explained that. But still there is an issue here. Because the link from the list of saved alerts and the link in the email are different from the link when you make the search.
This is the url in the search alert list:
https://ourdomain.se/?_category=5390&post_type=hp_listing&var%5B0%5D=5402&var%5B1%5D=5408&var%5B2%5D=5409&var%5B3%5D=5410&sAnd the url we you were on when you saved the search was this:
https://ourdomain.se/listing/?_sort=&s=&post_type=hp_listing&_category=5390&var%5B%5D=5402&var%5B%5D=5408&var%5B%5D=5409&var%5B%5D=5410The first url doesn’t work at all. You get a fatal error:
Fatal error: Uncaught Error: Call to a member function get_vendor() on null
in /home/123123.cloudwaysapps.com/xxxxxxxxxx/public_html/wp-content/plugins/hivepress/includes/controllers/class-listing.php on line 635Call stack:
HivePress\C\Listing::redirect_listing_view_page()
call_user_func()
wp-content/plugins/hivepress/includes/components/class-router.php:577
HivePress\C\Router::set_page_template()
wp-includes/class-wp-hook.php:303
WP_Hook::apply_filters()
wp-includes/plugin.php:189
apply_filters()
wp-includes/template-loader.php:104
require_once()
wp-blog-header.php:19
require()
index.php:17And if we just add “/listing” in the not working url we get the listings page alright with the filter preset but saying “Nothing found”.
Hemligg 1 year, 5 months agoJust adding “/listing” to the url does work. So ignore my claim that it results in “No result”. That was when I added “/listings” instead of “/listing”.
But still. The url in the mail and the list of saved search alerts does not include “/listing” which result in a fatal error when we try to access that url. But if “/listing” was added to the url then it would work.
Thanks for the details. The “/listing” part is not required, it’s added only if you browse the listings archive directly, but WordPres requires just 2 parameters to display the listing search results (post_type=hp_listing and s=some-search-query if available). For example, please click Search on the demo site to check how it looks (you can also choose some search filters) https://listinghive.hivepress.io/
The fatal error seems to be related to some non-existent or broken listing (e.g. listing without a vendor ID). Please try saving a search for another query that targets other listings to check this, you can also send temporary WP access via email to support@hivepress.io and I’ll check this for you.
-
AuthorPosts
New Reply
This forum has been archived and is no longer accepting new posts or replies. Please join our new community forum for support & discussion.