Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    Have you built this theme from scratch or is it a paid template? Have you tried the troubleshooting guide? https://time.ly/document/user-guide/troubleshooting/first-troubleshooting-step/

    Thanks,
    Ben

    Thread Starter Thorworx

    (@thorworx-1)

    Greetings Benjamin,

    Yes, I deactivated all plugins except AI1EC and WP-Types/Views and reverted to 2017 theme.

    Issue remains.

    AIEC plugin is injecting data into ALL loops on any single event page.

    It does not show up in the Views debugger as part of the returned query or post_objects, it shows up as Output (RAW) within the wpv-loops, and displays in the page as output.

    View post on imgur.com

    There seems to be a conflict between the two plugins, but I see that you’ve managed to fix the issue in the meantime, can you please share the solution?

    Thread Starter Thorworx

    (@thorworx-1)

    Greetings Benjamin,

    The folks at WP-Types provided me with a solution… for any Views outputting on an event page, I can add a parameter to the template shortcode…
    modify the content template shortcode from:

    [wpv-post-body view_template="view-grid"]

    To:

    [wpv-post-body view_template="view-grid" suppress_filters="true"]

    I don’t think I should have to do this.
    … based on their feedback, it seems that AI1EC is filtering the_content too soon.

    My preliminary additional testing shows that modifying AI1EC all-in-one-event-calendar/lib/http/response/render/strategy/html.php (lines 53 and 57) fixes the issue:
    From this:
    ` if ( isset( $params[‘is_event’] ) ) {
    // Filter event post content, in single- and multi-post views
    add_filter( ‘the_content’, array( $this, ‘event_content’ ), PHP_INT_MAX – 1 );
    return;
    }
    // Replace page content – make sure it happens at (almost) the very end of
    add_filter( ‘the_content’, array( $this, ‘append_content’ ), PHP_INT_MAX – 1 );
    }

    
    
    to this:
    

    if ( isset( $params[‘is_event’] ) ) {
    // Filter event post content, in single- and multi-post views
    add_filter( ‘the_content’, array( $this, ‘event_content’ ), PHP_INT_MAX + 1 );
    return;
    }
    // Replace page content – make sure it happens at (almost) the very end of
    add_filter( ‘the_content’, array( $this, ‘append_content’ ), PHP_INT_MAX + 1 );
    }
    `

    DEcreasing the priority of AI1EC the_content filter by INcreasing PHP_INT_MAX (HIGHER runs later, right?) fixes the problem without having to edit my WP-Views shortcode on every site/project. I suspect that your current code may cause issues with other plugins that may output loops on the event pages.

    Thread Starter Thorworx

    (@thorworx-1)

    I suppose you can mark this as resolved, but it would be nice if you considered testing and including the fix above in a future AI1EC update.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Serious bug: AI1EC injecting itself into WP-Views loops’ is closed to new replies.