infolock
Forum Replies Created
-
Thanks I’ll try what you’re suggesting (I’ve done what you’re suggesting but not since the latest updates after this thread as opened). If same issues, I’ll follow up with a new ticket.
@dudo “first of all the [yasr_visitor_votes] work only in single post or page, it doesn’t work on archive page.” <<<— Yep, I understand that
“Seems like yasr hasn’t built the tables” <<<—- Yep, that’s what I was saying in my comments above
“what is the prefix of your wordpress tables?” <<<—– “wp_” is the prefix I’m using
“From the log seems mydb.wp_ but this is really strange;” <<<—- why? mydb is just the name of my database – has nothing to do with wordpress
“default wordpress installation use wp_” <<<—- yes, that’s correct.
“have you added the prefix mydb. ?” <<<—- mydb isn’t a prefix – its the name of my databvase
Just creating another post here instead of adding on to the above:
Installing YASR works, and then activating it works. I can call
echo do_shortcode( '[yasr_visitor_votes size="small"]' );
to place it on any page which does work as well – the stars system shows.However, if you try to rate a post ( either on the frontend or the backend ( while on a post page ) ) the errors reported above in my previous comment flood the error log.
Example output ( with my real db being replaced with
mydb
and the path to wp being replaced with/path/to/
) is as follows:[06-Oct-2014 20:34:06 UTC] WordPress database error Table 'mydb.wp_yasr_log' doesn't exist for query SELECT * FROM wp_yasr_log ORDER BY date DESC LIMIT 0, 8 made by wp_dashboard, do_meta_boxes, call_user_func, yasr_display_dashboard_log_wiget [06-Oct-2014 20:36:32 UTC] WordPress database error Table 'mydb.wp_yasr_log' doesn't exist for query SELECT * FROM wp_yasr_log ORDER BY date DESC LIMIT 0, 8 made by wp_dashboard, do_meta_boxes, call_user_func, yasr_display_dashboard_log_wiget [06-Oct-2014 20:37:06 UTC] WordPress database error Table 'mydb.wp_yasr_multi_set' doesn't exist for query SELECT * FROM wp_yasr_multi_set ORDER BY set_id ASC made by include('wp-admin/edit-form-advanced.php'), do_action('add_meta_boxes'), call_user_func_array, yasr_add_metaboxes, yasr_get_multi_set [06-Oct-2014 20:37:06 UTC] WordPress database error Table 'mydb.wp_yasr_votes' doesn't exist for query SELECT overall_rating FROM wp_yasr_votes WHERE post_id=422 made by include('wp-admin/edit-form-advanced.php'), do_meta_boxes, call_user_func, yasr_metabox_overall_rating_content, include('/path/to/wp-content/plugins/yet-another-stars-rating/yasr-metabox-overall-rating.php'), yasr_get_overall_rating [06-Oct-2014 20:37:06 UTC] WordPress database error Table 'mydb.wp_yasr_votes' doesn't exist for query SELECT review_type FROM wp_yasr_votes WHERE post_id=422 made by include('wp-admin/edit-form-advanced.php'), do_meta_boxes, call_user_func, yasr_metabox_overall_rating_content, include('/path/to/wp-content/plugins/yet-another-stars-rating/yasr-metabox-overall-rating.php'), yasr_get_snippet_type [06-Oct-2014 20:37:08 UTC] WordPress database error Table 'mydb.wp_yasr_votes' doesn't exist for query UPDATE <code>wp_yasr_votes</code> SET <code>overall_rating</code> = '4.5', <code>reviewer_id</code> = 2 WHERE <code>post_id</code> = 422 made by do_action('wp_ajax_yasr_send_overall_rating'), call_user_func_array, yasr_insert_overall_rating_callback [06-Oct-2014 20:37:08 UTC] WordPress database error Table 'mydb.wp_yasr_votes' doesn't exist for query REPLACE INTO <code>wp_yasr_votes</code> (<code>post_id</code>,<code>overall_rating</code>,<code>reviewer_id</code>,<code>review_type</code>) VALUES (422,'4.5',2,'Product') made by do_action('wp_ajax_yasr_send_overall_rating'), call_user_func_array, yasr_insert_overall_rating_callback [06-Oct-2014 20:37:08 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 for query SELECT review_type FROM wp_yasr_votes WHERE post_id= made by do_action('wp_ajax_yasr_send_overall_rating'), call_user_func_array, yasr_insert_overall_rating_callback, yasr_get_snippet_type [06-Oct-2014 20:37:08 UTC] WordPress database error Table 'mydb.wp_yasr_votes' doesn't exist for query UPDATE <code>wp_yasr_votes</code> SET <code>review_type</code> = 'Product' WHERE <code>0</code> = '%s' made by do_action('wp_ajax_yasr_send_overall_rating'), call_user_func_array, yasr_insert_overall_rating_callback [06-Oct-2014 20:37:10 UTC] WordPress database error Table 'mydb.wp_yasr_votes' doesn't exist for query UPDATE <code>wp_yasr_votes</code> SET <code>review_type</code> = 'Product' WHERE <code>post_id</code> = 422 made by do_action('wp_ajax_yasr_insert_review_type'), call_user_func_array, yasr_insert_review_type_callback [06-Oct-2014 20:37:10 UTC] WordPress database error Table 'mydb.wp_yasr_votes' doesn't exist for query REPLACE INTO <code>wp_yasr_votes</code> (<code>post_id</code>,<code>overall_rating</code>,<code>review_type</code>) VALUES ('422','-1','Product') made by do_action('wp_ajax_yasr_insert_review_type'), call_user_func_array, yasr_insert_review_type_callback [06-Oct-2014 20:37:23 UTC] WordPress database error Table 'mydb.wp_yasr_votes' doesn't exist for query UPDATE <code>wp_yasr_votes</code> SET <code>review_type</code> = 'Product' WHERE <code>post_id</code> = 422 made by do_action('wp_ajax_yasr_insert_review_type'), call_user_func_array, yasr_insert_review_type_callback [06-Oct-2014 20:37:23 UTC] WordPress database error Table 'mydb.wp_yasr_votes' doesn't exist for query REPLACE INTO <code>wp_yasr_votes</code> (<code>post_id</code>,<code>overall_rating</code>,<code>review_type</code>) VALUES ('422','-1','Product') made by do_action('wp_ajax_yasr_insert_review_type'), call_user_func_array, yasr_insert_review_type_callback [06-Oct-2014 20:37:32 UTC] WordPress database error Table 'mydb.wp_yasr_votes' doesn't exist for query UPDATE <code>wp_yasr_votes</code> SET <code>review_type</code> = 'Product' WHERE <code>post_id</code> = 422 made by do_action('wp_ajax_yasr_insert_review_type'), call_user_func_array, yasr_insert_review_type_callback [06-Oct-2014 20:37:32 UTC] WordPress database error Table 'mydb.wp_yasr_votes' doesn't exist for query REPLACE INTO <code>wp_yasr_votes</code> (<code>post_id</code>,<code>overall_rating</code>,<code>review_type</code>) VALUES ('422','-1','Product') made by do_action('wp_ajax_yasr_insert_review_type'), call_user_func_array, yasr_insert_review_type_callback
One thing to note here is that I’m seeing these errors in the error_log ( after installing the plugin )
WordPress database error Table 'mydb.wp_yasr_log' doesn't exist for query SELECT * FROM wp_yasr_log ORDER BY date DESC LIMIT 0, 8 made by wp_dashboard, do_meta_boxes, call_user_func, yasr_display_dashboard_log_wiget
I’ve tried uninstalling this plugin and re-installing it, deleting it, etc.
Seems like the installer is fubar’ed or something…
Edit: Just to be clear, the above is not the only error. Any attempt to access a MySQL table that is for YASR throws an error. I checked my wp database and there are 0 tables for YASR installed. Other plugins install just fine. I’ve tried this on 2 sites so far and same issue. Feels like this is a minor bug. Haven’t looked further into it yet.
Point is: try checking your own error logs ( /var/log/nginx/error.log or /var/log/yourwebserverhere/error.log or even your php error log) – see if you’re having the same issues. if you are, chances are you aren’t doing anything wrong.
Forum: Fixing WordPress
In reply to: Use as featured image link not workingCardan: I’m not really sure when it happened. I know I tried disabling every single plugin, but it did not help, which leads me to believe it happens (as you say happens with Buletproof) after installation. So disabling doesn’t do anything since it already caused the damage.
With that being said, I’m also not sure how many other features of WordPress (if any) are affected by this.
Btw, did my solution work for you?
Just to clarify (since my first message seems a bit misleading), the media.php file is in /wp-admin/media.php. This file calls the function get_media_item() which is in /wp-admin/includes/media.php. The line I changed (in my file anyways) was line 1294..
Hope this helps.
Forum: Fixing WordPress
In reply to: Use as featured image link not workingSo, I fixed the issue. The issue is that, in the media.php file (/wp-admin/includes/media.php), this is where Set as Featured Image function is being called. For whatever reason, WordPress cannot find the file that houses this function (it’s located in /wp-admin/js/set-post-thumbnail.js).
In order to just make this work, I updated the function get_media_item. There is an if block that looks like this:
if ( 'image' == $type && $calling_post_id && current_theme_supports( 'post-thumbnails', get_post_type( $calling_post_id ) ) && get_post_thumbnail_id( $calling_post_id ) != $attachment_id ) {
Inside this block, there is a variable called $thumbnail that sets the actual text/action of Set As Featured. I prefixed the definition of the variable to manually load the js file we need. IE, the update looks like this
$thumbnail = "<script type=\"text/javascript\" src=\"/includes/wordpress/wp-admin/js/set-post-thumbnail.js\"></script><a class='wp-post-thumbnail' id='wp-post-thumbnail-" . $attachment_id . "' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\", \"$ajax_nonce\");return false;'>" . esc_html__( "Use as featured image" ) . "</a>";
and now boom, it works.
Forum: Fixing WordPress
In reply to: Use as featured image link not workingConfirmed. This is also happening to me (all plugins are disabled). (wordpress version 3.0.1)