Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Index Table
This topic contains 9 replies, has 2 voices, and was last updated by mmerrywest 7 years, 2 months ago.
- AuthorPosts
- July 27, 2016 at 10:15 am #9604
Hi,
I have the plugin installed and it was working fine. with more content it became slow, so I have tried turning on the index table, but it says it can’t create it and to contact support. I saw from the knowledgeable this may be to do with DB permissions, so I completely removed and re-added, but the plugin did not make the tables – may be some help, or may be a red herring.
Unfortunately the site is on an internal intranet, but I am able for you to share my screen
Mark
July 27, 2016 at 1:14 pm #9605Hi!
The most common cause of these types of issues are executed shortcodes, which are parsed along with the content when generating the index table.
Luckily it is possible to turn them off. Please go to the Advanced Options panel on the Index table submenu, and turn OFF the Execute Shortcodes? option: https://i.imgur.com/bKUaPkz.pngThen save the options and try to re-create the index table. Hopefully it should start working now.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 27, 2016 at 1:16 pm #9606Hi
I don’t get any options?
The index table does not exist and cannot be created. Please contact support.
Mark
July 27, 2016 at 1:34 pm #9607Oh sorry, I’ve misread the issue.
In that case, you can create the table manually instead by running the queries below. Don’t forget to replace the “wp_” prefix in “wp_asp_index” to the table prefix you are using (if different):
Table creation:
Indexes:
That should do the trick.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 27, 2016 at 1:49 pm #9608Nope, same issue unfortunately. Table created ok, but link is the wp-admin still has the same message
July 27, 2016 at 1:57 pm #9609That is very interesting. My only guess is that the DB account that wordpress uses does not have permissions to the SHOW command (?), so it’s not able to check it’s existence. It only makes sense to me this way.
If the table is indeed there correctly, then I guess it’s safe to ignore this check, as it makes no difference whatsoever. For that you will have to make a modification. Open up the wp-content/plugins/ajax-search-pro/includes/etc/indextable.class.php file and scroll to lines 154-168, which should be this function:
function checkIndexTable( $create_if_not_exist = false ) { global $wpdb; $table_name = $this->asp_index_table; if ( $wpdb->get_var( "SHOW TABLES LIKE '$table_name'" ) != $table_name ) { if ( $create_if_not_exist === true ) { $this->createIndexTable(); return $this->checkIndexTable( false ); } else { return false; } } return true; }
Replace that function with simply this:
Best,function checkIndexTable( $create_if_not_exist = false ) { return true; }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 27, 2016 at 2:06 pm #9610Hmm, it now gets me to the settings page described before and I have turned off execute shortcodes. It seems to make an index and shows a success message, but when I look in the DB table – its empty!
July 27, 2016 at 2:11 pm #9611Are you sure that the index table name is correct? It would explain the previous and this issue as well.
The default wordpress table prefix is “wp_”, but in some cases it’s different. So the default index table name becomes “wp_asp_index”. Can you please check that? Is your table prefix “wp_” ?
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
July 27, 2016 at 2:13 pm #9612sent screenshot by email
July 27, 2016 at 2:16 pm #9613Ok, tested the functionality and it is working, so it must be putting them somewhere, I can trace it from here
Many thanks for all your help
Mark
- AuthorPosts
You must be logged in to reply to this topic.