• Resolved lrunnells

    (@lrunnells)


    Just a heads up that your plugin, The SEO Framework, is incompatible with another plugin called TM Extra Product Options.

    I opened a support ticket with the author of Extra Product Options and he says that he has found the incompatibility but needs a “filter” or another way to bypass a particular line of code from the author of The SEO Framework in order for the two to work together. You can see the support thread here: https://support.themecomplete.com/forums/topic/wrong-options-being-displayed-on-product-page/page/2/ with the part of the code that is in conflict.

    Please let me know if/when you get this issue sorted out so that I can go back to using your plugin for SEO. I’d prefer to use The SEO Framework, but I need the Extra Product Options for my site so I am forced to use the Yoast SEO plugin, which works but is bloated in my opinion.

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

Viewing 5 replies - 16 through 20 (of 20 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi @lrunnells,

    You should uncheck “Enable archive query alteration?” for the wanted effect.

    Unfortunately, for no given reason, I wasn’t allowed access to the conflicting plugin’s code (I blame Envato). Otherwise, this option change wouldn’t be necessary ??

    That said, TM Extra Product Options will deliver a patch that will make it all work again, regardless ??
    Keep an eye out on their changelog to find out when you can revert the option change, if wished for.

    @lrunnells @cybr

    You should uncheck “Enable archive query alteration?” for the wanted effect.

    Hmm. Well, just changing it to ‘on site’ rather than ‘database’ seemed to work for me too…

    (the code snippet was working before, and then suddenly wasn’t; maybe setting it to ‘on site’ made it work again??)

    • This reply was modified 7 years, 3 months ago by mintynz.
    Plugin Author Sybre Waaijer

    (@cybr)

    Hi @mintynz,

    Nope, the snippet still won’t do anything ?? What it acted upon has been removed in 2.9.4.

    “On the site” works a little differently than “in the database”, and I assume (still haven’t seen the code, super annoying…) that the meta query conflicts with their way of the latter implementation.

    That said, the implementation TSF has for “in the database” merges other alterations, so I don’t believe TSF is to blame.

    FWIW, in this thread the author of Product Options said he’d emailed you (Aug 10):
    https://support.themecomplete.com/forums/topic/wrong-options-being-displayed-on-product-page/page/2/

    He seems quite open to finding a solution.

    His note about the conflicting code is below, in case that’s of use.

    For me, it’s working with ‘on site’ and it’s not a large site, so that’s fine by me. Thanks again for being so responsive!

    Cheers,
    Minty

    —-
    I have determined the cause of this issue.

    It’s in the file \autodescription\inc\classes\init.class.php and this is the code:

    \add_action( 'pre_get_posts', array( $this, 'adjust_archive_query' ), 9999, 1 );
    public function adjust_archive_query( $query ) {
     
            // Don't exclude pages in wp-admin.
            if ( ( $query->is_archive || $query->is_home ) && ! $this->is_admin() ) {
     
                $meta_query = $query->get( 'meta_query' );
     
                //* Convert to array. Unset it if it's empty.
                if ( ! is_array( $meta_query ) )
                    $meta_query = $meta_query ? (array) $meta_query : array();
     
                /**
                 * Exclude posts with exclude_from_archive option on.
                 *
                 * Query is faster when the global relation is not set. Defaults to AND.
                 * Query is faster when no value is set. Defaults to 'IS NULL' because
                 *       of 'compare'. Having no effect whatsoever as it's an exclusion.
                 */
                $meta_query[] = array(
                    array(
                        'key'      => 'exclude_from_archive',
                        'type'     => 'NUMERIC',
                        'compare'  => 'NOT EXISTS',
                    ),
                );
     
                $query->set( 'meta_query', $meta_query );
            }
        }

    When this executes it overrides the plugin’s own meta query and there isn’t anything in the code to make to do that from my end, thus the incompatibility.

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi @mintynz,

    The annotated code has been removed in 2.9.4 and has been implemented differently.
    That said, it still tries to achieve the same.

    It doesn’t overwrite anything; it merges itself with other things by sequentially executing get(), array push and set().
    I’ve tested this with other plugins, but I am physically unable to verify this with TC’s.

    In any case, a composite filter has been added that helps TC resolve it from their side.

    So, with all of the above, this issue is out of my hands and it’s just a matter of time before it’s fixed indefinitely ??

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Incompatibility with TM Extra Product Options’ is closed to new replies.