Forum Replies Created
-
AuthorPosts
-
August 27, 2014 at 8:03 am in reply to: Showing the search results on the search page (i.e. going without the Ajax) #2282
Ernest Marcinko
KeymasterHi!
This is actually requested by some users right now. The problems are:
1. The search uses POST method instead of GET, to prevent excessive external usage – I highly doubt I can change that as of now, or ever – it’s too much of a security risk.
2. The data returned by the search is not in a compatible format with a standars “WP_Query” data. There are several reasons for this, manly related to search speed and compatibility and of course some data does not have the required fields to act like a post – which cannot be returned as a default search result.
This issue is far more complicated, than a few modifications unfortunately. I have tried to solve this a few times as of now, but something always went wrong.
The solution will involve creating a filter, which hooks to the default search filter, then includes the search files, sends the search data through somehow (selected checkboxes, etc), transforms the data to the ajax search pro, recieves the results, then converts the results to wordpress-compatible format and returns.
Ernest Marcinko
KeymasterHi!
It looks like that plugin was somehow interfering with the custom ajax handler. I changed the search code a bit to the default ajax handler, now it should return results.
Ernest Marcinko
KeymasterHi!
I think it’s ok now. Just had to re-save the cache settings, some data in the database must have been inconsistent.
Ernest Marcinko
KeymasterYou can edit your first post in this thread, there are fields for ftp access to fill out – those are private.
Ernest Marcinko
KeymasterHi!
I don’t see the problem with the theme icons. Can you double check it please and perhaps send a screenshot? I can see them fine.
As for the results, the server returns an error 500, which can be anything from incompatibility to sintax errors. Can you please provide temp ftp access to run a debugging on the code?
Ernest Marcinko
KeymasterHi!
I think the problem is that it’s inside of the
Ernest Marcinko
KeymasterHi!
No, it would change it to ever type.
I however made a change on the search code directly to cut only polaroid titles. It should look better now. Currently is set to 30 characters.
Ernest Marcinko
KeymasterHi!
Only by writing a filter code.
Put this to your theme functions.php file:function asp_shorten_title( $title ) { $length = 20; $title= (strlen($title) > $length) ? substr($title,0,$length).'...' : $title; return $title; } add_filter( 'asp_result_title_after_prostproc', 'asp_shorten_title' );This will cut down the title to max 20 characters. You can change the number to anything you want.
Ernest Marcinko
KeymasterHi!
I did a few changes on the code which I suspected it was slowing down the process. It was just a random shot, so I don’t know if it actually helped. Right now it takes around 2-5 (5.36 was the highest measured) seconds for me, which seems normal. If however the load is constantly over 5 seconds, then there is something interfering with the plugin. Some spikes might happen (due to server load, maintenance, etc..), but it should not be consistent.
Let me know how is it working now.
If there are constant issues, you should provide temp ftp access as well, so I can run debugging on the search code to search for the cause.
Ernest Marcinko
KeymasterHi!
I cannot seem to find the url for the backend to check the settings. Can you please tell me where to log in?
The problem is with jQuery. None of the jQuery plugins are working because it’s moved to the footer. I can see 10 error messages on the developer tools related to jQuery.
After trying to log in by opening the lascomiditasdepapa.com/wp-login.php the site must have locked me out, because I cannot access it anymore. Can you please check that?
Ernest Marcinko
KeymasterHi!
If you recently moved to a https domain from http, then please save the search settings again. It should re-generate the css file with the proper https prefixes.
Ernest Marcinko
KeymasterAlso please check if the permissions on the plugins/related-posts-pro/includes/cache/ folder are indeed set to 777.
Be aware that there are two cache folders!
1. plugins/related-posts-pro/cache/
2. plugins/related-posts-pro/includes/cache/Timthumb uses the second one, that’s where the index.html file should be placed.
Ernest Marcinko
KeymasterHi!
The timthumb image url is giving me the following error:
A TimThumb error has occured The following error(s) occured: Could not create the index.html file - to fix this create an empty file named index.html file in the cache directory.
You can check it here: http://www.4g.co.uk/wp-content/plugins/related-posts-pro/includes/timthumb.php?ct=1&cc=FFFFFF&q=95&w=200&h=200&src=http%3A%2F%2Fwww.4g.co.uk%2Fwp-content%2Fuploads%2FLumia_930_4G_small.jpg
I suppose that timthumb needs an index.html file in the cache folder. Please try to create one with 777 permissions in the plugins/related-posts-pro/includes/cache/ folder.
Ernest Marcinko
KeymasterHi!
I thought you meant search autocomplete not the keyword suggestions. I have turned them off for you. The option is at “General Options -> Behaviour -> Keyword Suggestion on no Results?” if you need to turn it on any time.
Ernest Marcinko
KeymasterActually timthumb is a little bit more resource heavy, but there is not much of a difference – at least I couldn’t spot it. The non-timthumb version generates the images once, then loads them every time, so once an image is created it’s used all the time. Timthumb does almost the same but after the page load, so the rendering is delayed, but microrequests are made towards the server to check the cache. Anyways, the results are almost identical.
But if you want to use timthumb anyways, then check the permissions on the plugins/related-posts-pro/includes/cache folder. The permission should be 777. Some servers however does not tolerate this level so you can also try 766 then 755 as well. If none of them works, then the problem is elsewhere, or the permissions are locked via SSH.
Same thing for the plugins/related-posts-pro/cache/ (folder only) and plugins/related-posts-pro/css/ (folder and all of the contents!). After changing permissions on the css folder the error message should disappear after saving the settings regarding the “Error saving stylesheet…”.
If the error does not disappear then you can still try to turn off the inline styles option, it may still work. (there is a tiny chance the the server reports different permission values to the script than it really is, and it triggers the message)
-
AuthorPosts