Widget Builder
Widget Builder conflicts with All-in-One events calendar and Events Manager (6 posts)

  1. RoryFoster
    Posted 3 years ago #

    Widget Builder, when activated, shows duplicates of a given event created through both All-in-One event calendar and Events Manager plugins. The event is shown in the "page" of the event, and it is duplicated in the right sidebar where the widgets should be displayed. I deactivated all plugins and turned one on at a time, and it was Widget Builder that was causing the duplicate showing of the events.

    Is there an easy fix for this?

    Thank you,

    Rory Foster


  2. Timothy Wood
    Plugin Author

    Posted 3 years ago #

    Thank you for bringing this to my attention. I have a feeling it could be how the other plugins inject into the_content. I will look into a way around this.

  3. dannod
    Posted 3 years ago #

    This is quite the hack, but I had to quickly fix this for a low traffic site. So code optimization and future theme compatibility aside, I decided to do a string replace to yank the repeated calendar entry that shows up in the widget. To do this I found the starting and ending html that was being re-injected and removed everything in between. There might be a better way but I didn't have time.

    So in this file:


    I looked for where the widget content was rendered -- which is essentially right here:

    $widget .= $content;

    just ABOVE that, I added the following code to strip the repeat from the $content variable.

    // this replacement is to remove the injection of the calendar data into the Widget Builder code at the bottom.
    $tagOne = "<a name=\"ai1ec-event\"></a>";
    $tagTwo = "</table>";
    $replacement = "<!-- CONFLICT REMOVED -->";
    $startTagPos = strrpos($content, $tagOne);
    $endTagPos = strrpos($content, $tagTwo);
    $tagLength = $endTagPos - $startTagPos + 8;
    // check to make sure it found something or else it will strip up to the tag2 if it finds it
    if($startTagPos < $endTagPos) {
       $content= substr_replace($content, $replacement, $startTagPos, $tagLength);
    // end injection fix
  4. dannod
    Posted 3 years ago #

    I should note that in my above solution, obviously there is no guarantee that the tagOne and tagTwo flags will remain consistent in the calendar code, but hopefully by then either WidgetBuilder or AllInOne will remedy the problem.

  5. RoryFoster
    Posted 3 years ago #

    Thank you Dannod!

  6. germars
    Posted 3 years ago #

    Has this been fixed yet? The issue removes the widget menu item from Appearance, even when you have deleted the plugin! It's a shame as it was the best calendar that I found.

    I've spend the past two hours updating the site to fix this issue, only to have it happen again as it was the All in One Calendar that was causing the issue. (you are never sure until you try)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Widget Builder
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.