Home Forums Weaver and Plugin Interaction Ai1ec – All in One Event Calendar display

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #52883
    phillip_benson
    Participant

    I use [show-posts] to fill in the details for an event, having previously used a set of template posts to generate a complete post.  So, complete all the usuual boxes for the event and then put the [show-posts] in the description.

    The event show on the calendar, and expands very nicely, thank you, when the event is clicked on, displaying correctly.

    Clicking on show more, however opens with multiple copies, most incomplete, of the event details and map, between the sub-posts that comprise the complete post referred to by the [show-posts] used in the event editor.

    This is an example (scroll back to see the event as the date is in the past).

    http://www.atherstonefolkclub.org.uk/calendar/

    What am I doing wrong?  Is there a glitch?

    Thanks in advance.

     

    #52887
    scrambler
    Moderator

    Sorry, but I am not quite following.

    Can you try to elaborate

    #52891
    phillip_benson
    Participant

    I run music events, festivals, folk clubs.

    Each event has its own post based on the date it occurs – “event”

    Each event post consists of a number of biography posts that describe a main artist and another that encompasses each of the support artists, together with start and end templates.

    So, the “event” structure would look something like this ( I have excluded details for clarity):

    –start of event—

    [show-post main-artist]

    [show-post support-artists-for-event] – which is built of a number of posts itself —

    [show-post-support-intro]

    [show-post-support-artist-1]

    [show-post-support-artist-2]

    [show-post-support-artist-3]  etc

    [show-post-support-buy-tickets] for example – if needed

    — end of event —

    Having created each of the blocks used, they are available for other events, saving time creating posts for subsequent events.

    I have used Ai1ec before, but always created a complete post in itself, not using [show-posts].

    I tried creating an event, filling in each of the contact, date, price, etc, boxes, and then putting [show-post event] into the description.  It works in the initial calendar, but if I click on Show More to see the full event details, it is incorrectly displayed.

    Have a look here, and see what I mean.

    http://www.atherstonefolkclub.org.uk/calendar/

    Thanks again.

     

     

     

     

    #52892
    phillip_benson
    Participant

    You will need to go backwards on the calendar page to see the events that are in the past.

    #52893
    Weaver
    Keymaster

    I don’t know what would be “correct”, but the “Read more…” link at the bottom of the event box (that opens after clicking the + in the upper right) is generated by the event plugin, and not [show_posts]. So what is displayed is not controlled by [show_posts].

    What you would need to try is to create some test event that does not use [show_posts] and then see where the “Read more…” link takes you.

    I’m almost surprised that the calendar plugin even processes shortcodes, but apparently that works at least that far.

    I’m thinking each event is a custom post type, and it is possible there is a conflict with the nesting of a regular post included by [show_posts] inside an event post.

    #52896
    scrambler
    Moderator

    I am also concerned by[show-post support-artists-for-event] – which is built of a number of posts itself

    Which implies you are nesting posts inside of posts, and I am not sure how WordPress can handle that.

    #52900
    phillip_benson
    Participant

    Yes, thanks, I realise how the Read More works.

    If I generate a complete event without using [show-posts], everything is fine.  It also works OK if I use a [show-posts] that is not nested; it’s the nesting that causes an issue.

    Away from Ai1ec, standard posts that are built using multiple layers of nested [show-posts] also work fine.  I have been using nested blocks in Weaver Pro and Xtreme Pro, sometimes quite deeply nested, without issues or conflicts with other plugins.

    The issue only arises in conjunction with Ai1ec. There is, clearly, a conflict between nested Xtreme [show-posts] and Ai1ec that results in a corrupted display.  I am trying to discover if there is a fix that allows me to continue using nested [show-posts].  Has anyone out there run into the same issue and solved it?  Is it a case of using a specific post template or type to get around the problem?

    Thanks for the help.  Much appreciated.

    #52901
    phillip_benson
    Participant

    I could., of course simply direct the Read More to a page, but that gives a different result. Or I could hide it, but that is not what I am looking for.

    #52905
    Weaver
    Keymaster

    It always has been somewhat problematic to try to create nested [show_posts]. If you’ve had success, that is great. If it works or not would be somewhat dependent on the order. I think with [show_posts], the most serious issue is if one post uses [show_posts] that ends up trying to show the original post, which would lead to infinite recursion of trying to show posts. Using a [show_post] in a post displayed by a [show_post] but one that won’t directly nest should work.

    It does sound that perhaps the plugin has a oversight in how it is handling the post loop that does not account for nesting.

    From a WordPress technical standpoint, whenever a set of posts is displayed, the posts are displayed using a mechanism called “The Loop”. There is a main WordPress loop for each and every page and post (although pages generally only use the loop once). A post loop will display a sequence of posts based on various filters. WordPress starts with a default loop like you see on a blog page or an archive-like page.

    Problems occur if a post itself tries to execute a new loop (which is what [show_posts] does). Note that I believe that the event plugin you are using uses a custom post type to create each event, and when displaying events will end up creating its own new loop. When code nests loops, it needs to take certain steps to be sure it doesn’t break what may be an outer loop. [show_posts] does that fairly well, but will fail if the loop is recursive. I might guess that the event plugin is running a loop without properly saving any outer loop, which could make [show_posts] loop fail.

    Bottom line, I think it is an issue with your events plugin that might be able to be fixed by the plugin creator. But the code to do that is actually quite complicated and delicate to get right, and not something commonly needed.

    #52909
    phillip_benson
    Participant

    Thanks for all the input.  Yes, I have had success with nested [show-posts] for quite a while, (always being aware of recursion problems) but never managed to get Ai1ec to work well with them.  Most other plugins do co-operate, luckily.

    I did not want to throw away a lot of work already done producing the smaller posts that are called to produce the combination that becomes the full post.  However, it seems that, if I want to use Ai1ec, I may have to simply copy and paste their code into each individual event, after all, rather than simply using [show-posts].

    Aaaaah, well.

    Thanks again.

    #52922
    Weaver
    Keymaster

    You might contact the plugin support to ask if they are adding the proper WordPress api calls to make sure they don’t disrupt the state of the loop (that they save and restore the previous state before starting their own.)

Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘ Weaver and Plugin Interaction’ is closed to new topics and replies.