• Resolved ulula

    (@ulula)


    Hi everyone,
    I was using YARS for a good amount of months without any problem. In the last days my client noticed that his website break apparently from nothing. I activated the debug mode and had to face to some errors of the plugin. These are the errors I found:

    Notice: Undefined index: auto_insert_where in /var/www/giacovelli/web/viaggimalta.it/wp-content/plugins/yet-another-stars-rating/yet-another-stars-rating.php on line 101

    Notice: Undefined index: auto_insert_size in /var/www/giacovelli/web/viaggimalta.it/wp-content/plugins/yet-another-stars-rating/yet-another-stars-rating.php on line 102

    Notice: Undefined index: auto_insert_exclude_pages in /var/www/giacovelli/web/viaggimalta.it/wp-content/plugins/yet-another-stars-rating/yet-another-stars-rating.php on line 103

    Notice: Undefined index: auto_insert_custom_post_only in /var/www/giacovelli/web/viaggimalta.it/wp-content/plugins/yet-another-stars-rating/yet-another-stars-rating.php on line 104

    Notice: Undefined index: snippet in /var/www/giacovelli/web/viaggimalta.it/wp-content/plugins/yet-another-stars-rating/yet-another-stars-rating.php on line 128

    I opened the interested file, and this is where it breaks:

    if ( YASR_AUTO_INSERT_ENABLED == 1 ) {
            define( "YASR_AUTO_INSERT_WHAT", $yasr_stored_options['auto_insert_what'] );
            define( "YASR_AUTO_INSERT_WHERE", $yasr_stored_options['auto_insert_where'] );
            define( "YASR_AUTO_INSERT_SIZE", $yasr_stored_options['auto_insert_size'] );
            define( "YASR_AUTO_INSERT_EXCLUDE_PAGES", $yasr_stored_options['auto_insert_exclude_pages'] );
            define( "YASR_AUTO_INSERT_CUSTOM_POST_ONLY", $yasr_stored_options['auto_insert_custom_post_only'] );
        } 

    So, I opened mysql and looked for the stored data in wp_options. I think this is the interested line:

    option_name :
    yasr_general_options

    option_value :
    a:16:{s:16:”auto_insert_what”;s:14:”overall_rating”;s:19:”text_before_overall”;s:0:””;s:26:”text_before_visitor_rating”;s:0:””;s:25:”text_after_visitor_rating”;s:0:””;s:24:”custom_text_must_sign_in”;s:0:””;s:22:”custom_text_user_voted”;s:0:””;s:12:”allowed_user”;s:15:”allow_anonymous”;s:16:”snippet_itemtype”;s:5:”Other”;s:29:”blogposting_organization_name”;s:14:”ViaggiMALTA.it”;s:29:”blogposting_organization_logo”;s:53:”https://viaggimalta.it/wp-content/uploads/favicon.png”;s:19:”auto_insert_enabled”;i:1;s:20:”show_overall_in_loop”;s:7:”enabled”;s:26:”show_visitor_votes_in_loop”;s:7:”enabled”;s:17:”text_before_stars”;i:1;s:14:”visitors_stats”;s:3:”yes”;s:9:”enable_ip”;s:3:”yes”;}

    Here you can see that all the mentioned var are not present, except for “auto_insert_what” that is present but throws the error anyway.

    Please give me an hand, the customer is already complying about the loss of the stars and all the consequences involving google results.

    Plugin version: 1.9.4
    WP version: 4.9 – About this I read that I should update WP, but my client doesn’t want to switch to Gutenberg so for now I have to keep it stucked at that version.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor dudo

    (@dudo)

    Hi, I need more info:

    does the auto insert is enabled?
    Can you try to enable/disable and save the settings?

    Can you share a screenshot of the settings?

    Plugin Contributor dudo

    (@dudo)

    Just to clarify:

    if Use Auto Insert? is set to no, first parameter in the db should be this

    show_overall_in_loop

    And no one of the prior setting is stored in the db.

    IF instead,auto insert is enabled, all auto_insert_ settings are stored.
    So, just try to disable and enable it again and save settings (or vice versa)

    • This reply was modified 5 years, 10 months ago by dudo.
    Thread Starter ulula

    (@ulula)

    Hi Dudo,
    thanks for the sunday fast reply, I really appreciate it.
    Yes, the auto insert was enabled, I tried to force enable/disable and it fixed itself. Strange because before writing I deactivated the plugin, deleted the tuple, reinstalled and I still had the error.

    Thank you again you can close the topic.

    Plugin Contributor dudo

    (@dudo)

    That’s because disabling or deleting the plugin doesn’t change anything in the db ??

    Have a nice day,
    Dario

    Thread Starter ulula

    (@ulula)

    eheheh now I know something new ??
    Thanks again,
    have a nice day too!
    Alessia

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error on vars auto_insert_where / where, etc’ is closed to new replies.