Support » Plugin: Markup (JSON-LD) structured in schema.org » Settings get mysteriously disabled

  • I faced same problem of resolved thread “Settings get mysteriously disabled”.

    In file: includes/admin/wp-structuring-admin-db.php

    
        private function create_table_execute ( $charset_collate, $text_domain, $version ) {
    
            $options = get_option( $text_domain );
    
            if ( $options ) {
                    $options = array_merge( $options, $args );
            }
            update_option( $text_domain, $options );
        }
    

    The option is never created if option is not exists.

    
        /**
         * version up process.
         *
         * @version 4.4.0
         * @since   2.0.0
         * */
        $options = get_option( $text_domain );
    
        if ( !isset( $options['version'] ) || $options['version'] !== $version ) {
                $lists = $this->get_list_options();
    
                $wpdb->query( "DROP TABLE " . $this->table_name );
                $this->create_table_execute( $charset_collate, $text_domain, $version );
    

    $options is always FALSE and version up process run.

    Is this the expected behavior?

    I think that settings get disabled when two version up process run concurrently (called from admin_ajax.php).

    • This topic was modified 1 year, 3 months ago by me240.
Viewing 14 replies - 1 through 14 (of 14 total)
  • I have the same issue…I enable the items but after a while all come back disabled.

    I updated to the last release.

    I am also facing the same issue.

    maybe when we are selecting “Set the first image in the content.” then after some seconds it’s automatically disabled.

    donna

    (@donnab-seenontopcom)

    I am also facing this same issue.

    I configure all the settings I want, save, logout and come back in. Nothing was saved. Everything is disabled again.

    I am using version 4.6.1 – the latest.

    I added this line to functions.php and delete it after a while.

    
    update_option('wp-structuring-markup', array('version' => '4.6.1'));
    

    Then, settings have been enabled for a week.

    donna

    (@donnab-seenontopcom)

    @miiitaka I read the previous posts on this same issue. Is there a conflict with another plugin that may need to be disabled? Do you agree with using @me240’s solution?

    donna

    (@donnab-seenontopcom)

    @me240, is your solution still working?
    Will you have to update it whenever the plugin is updated? I’m asking because of the specific reference to version 4.6.1.

    My solution is still working. But that is only for version 4.6.1 of this plugin.
    I expect the problem to be solved in the next version.

    I am also facing the same problem

    donna

    (@donnab-seenontopcom)

    I had to disable w3total cache in order for the schema settings to “stick”.

    I started the original thread and just noticed that all my settings are once again disabled. It seemed to have held for a while but now they are all disabled. Not sure if it is because I update plugins regularly or what.

    donna

    (@donnab-seenontopcom)

    I disabled w3total cache and that seemed to work for a while but I’m back to all settings being erased. I have abandoned the plugin as the developer is not giving us an answer.

    I’ve looked at the previous posts on this topic and haven’t been able to get an answer there either. Am I just not seeing it? If it’s there, please share a link to that post so I and others can find it.

    I noticed that the conflict is happening with the plugin
    Yoast seo.

    And also when updating any publication (post)

    Do you plan when to update the plugin?

    The error is here. It’s never setting the version

    		$args = array( 'version' => $version );
    		$options = get_option( $text_domain );
    
    		if ( $options ) {
    			$options = array_merge( $options, $args );
    		}
    		update_option( $text_domain, $options );

    You can make it be the following and it will work:

    		$args = array( 'version' => $version );
    		$options = get_option( $text_domain );
    
    		if ( $options ) {
    			$options = array_merge( $options, $args );
    		}
    		else
    			$options = $args;
    		
    		update_option( $text_domain, $options );
Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Settings get mysteriously disabled’ is closed to new replies.