Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Multisite option not working
This topic contains 41 replies, has 2 voices, and was last updated by remb6464 4 years, 11 months ago.
- AuthorPosts
- June 13, 2018 at 6:17 pm #18256
Hi Ernest
Thanks a million, it’s very much appreciated.
Have corrected the errors and will carry out some extensive testing over the next few days.
I would have never figured out the over-ride function.
Thanks again and chat soon.
Robert
June 15, 2018 at 9:53 am #18298Hi Ernest
Hope you’re doing good.
Some issues are driving me crazy, can’t see any solutions.
1: Multi-site is not working. (Activated and everything, just not working)
2: I deleted that php.functions code for a min to see if that was causing the problem, and now the image fix isn’t working either. ( I put the code back by the way but still not working)
3: When searching I often get a “?phrase=” type URL. (Image attached).
Can you please help me get this right, I’m losing my mind here and still have 1000 other things to finish.
Regards,
Robert
Attachments:
You must be logged in to view attached files.June 15, 2018 at 10:14 am #18301You cannot access this content.June 15, 2018 at 11:20 am #18307Hi,
The images are ok now.
It’s just problem 1 and 3.
Cheers
June 15, 2018 at 12:25 pm #18310Hi,
1. Can you please explain this in more details? I am not sure what are you reffering to exactly.
3. There are multiple major javascript errors on your site front-end, which cause further script exection to work, which may cause the plugin to malfunction as well: https://i.imgur.com/U5znIzm.png
Best,
On my end the plugin works at the moment, but it may not work on other browsers. I highly suggest investigating these issues, these are major script errors.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 15, 2018 at 12:54 pm #18311Hey
Thanks for your answer.
1: The search bar does not return any results from the other blogs even though the multi-site option is activated.
2: The image problem is there again. I don’t know what’s up with that.
3: Please forget this one, I will clean up the java script myself.
So it’s just 1 and 2. The images are not working again. And no results show from other blogs within the network.
Thanks a mill and hope that clarifies the issues.
Regards,
Robert
June 15, 2018 at 1:00 pm #18312Also, please note that any existing results come back all messed up. Like feel free to delete everything if necessary. I have a back up of the search code. Or can redesign from scratch if necessary.
Just the fundamental functions need to be correct as you know.Cheers
June 18, 2018 at 9:20 am #18331Hi Robert,
I will check them in a minute, but the 1. one might not be resolvable, I am not sure. I will try to explain. WordPress is not capable/designed of getting cross-site results and displaying them on the results page by default. There is a mechanism in the search, that sort of ‘fakes’ these objects and passes them to the results page. This is neccessary, as if for example post A from blog X is displayed on blog Y, it is parsed by it’s ID. However the post ID is not unique on the whole network, only on the current blog. So post A on blog Y might not even exist, even though it exists on blog X. The search results page usually a query, that goes through all the objects passed to it without additional information.
In your case however, there is an image and a price, which I guess is parsed by the post custom fields – and that is causing the missing result. The post object is re-queried on the results page to get the price, image etc.. – however a cross site post does not exist on the current site, causing a missing item. This all would be fine, if there was any way of telling WordPress, when passing the results to swtich the blogs, before getting the results, and as far as I know it is not possible.I will try to experiment with possibilities, that may work on your specific installation, but please note that this is far beyond the scope of this plugin, due to these core limitations. I will get back to you in a couple of hours.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 19, 2018 at 12:34 pm #18362Hi,
I may have managed to find a possible solution, even to display posts from cross-site with images. I had to make a direct modification within one of the template files as well, but it seems to be doing the trick.
As I mentioned earlier, the problem is, that the network blog needs to be switched before a cross site post is processed on the results page. WordPress however does not have any method to memorize the blog ID for each post. My solution to bypass this problem was the following:
1. I have simply added this short custom code to the theme functions.php file:
2. I have added two additional custom code sections to the themes\classipress\content-ad_listing.php file:
First addition
Second addition
You can see these additions within that file. A full back up of the original can be found here, and a back-up of the modified here.
On the side note, the second addition is not neccessary, I only added it, because I noticed that the images are linking to an incorrect URL on the subsites as well. For example, this post, where the image is broken: https://i.imgur.com/nqA3xAL.png
Best,
The second addition is only to resolve this on the main site, but once the images are fixed on all sub-sites, that code section should be removed.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 19, 2018 at 6:04 pm #18364Hi Ernest
Hope you’re doing good.
Thank you very much for the update and your support on getting this right.
Your plugin’s design fits the site well so I’m keen to get it to work correctly.
Maybe I didn’t understand some of your last message.
But I did some tests and no images are showing for multi-site results?
Is there something I’m wrong? You mentioned some code to be deleted related to photos, but not sure I understand fully.
Thanks again and look forward to hearing from you and getting this system up and running.
Regards,
Robert
June 21, 2018 at 2:56 pm #18386Hi Robert,
Basically, I added two separate custom codes, one to resolve the missing information, and the other to resolve some of the images.
The secod one should not be there, but I decided to leave it, as I noticed, that if I search for example ‘a3’ then the returned results had a missing image. By missing, I mean that the image was found, but pointing to a non-existent image file. So I checked each result to see if the results page actually has an image, or the problem is somewhere else. I found that the images were incorrect on the sub site, for example this post (fixed now), looked like this.
Now, that I see you fixed the sub-site images, I simply removed that second custom code. I believe the images should be correct on each result now.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
June 27, 2018 at 1:15 am #18455Hi
Thanks very much Ernest.
Will give this a try and see how it goes.
Chat soon.
Regards,
Robert
- AuthorPosts
You must be logged in to reply to this topic.