Events Manager
[resolved] possibly small bug when using [events_list] (7 posts)

  1. leoloso
    Posted 3 years ago #

    Hi Marcus again, I found another small bug

    I want to add an Events page with
    - The Upcoming Events, paginated
    - The past Events, not paginated

    [events_list scope="future" limit=10 pagination=true]
    [events_list scope="past" limit=5 order=DESC page=1]

    as you can see I add page=1 in the second list, this should fix it to that page, and not take param "pno" when paginating the first list

    However this doesn't work, so when going to the second page of the first list, the second list also goes to its second page

    I saw in function em_get_events_list_shortcode you have:

    $atts['page'] = ( !empty($atts['page']) && is_numeric($atts['page']) )? $atts['page'] : 1;
    $atts['page'] = ( !empty($_GET['pno']) && is_numeric($_GET['pno']) )? $_GET['pno'] : $atts['page'];

    So then param "pno", if it exists, will override that arg page. I think it should be the opposite: it should take param "pno" unless it is defined in the args

    So I changed those 2 lines into this:

    $pno = ( !empty($_GET['pno']) && is_numeric($_GET['pno']) )? $_GET['pno'] : 1;
    $atts['page'] = ( !empty($atts['page']) && is_numeric($atts['page']) )? $atts['page'] : $pno;

    I hope you agree with this change

    Cheers again


  2. agelonwl
    Posted 3 years ago #


    I get this too, however don't think that this is a bug since you can trying to add 2 shortcodes with pagination on the same page which confuses the two I think? but maybe @Marcus does have any idea about this.

  3. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    this is somewhat inevitable. We use the same variable to detect page numbering so any item of ours on a page using pagination would share it with other items of ours using pagination.

    You'd need to change pno to something else in the code we use to generate a specific bit of information to have it show differently.

  4. leoloso
    Posted 3 years ago #

    Hi Marcus, yes I understand completely, however in my opinion the argument in the shortcode should have more priority that the param, since you're fixing the value to what is desired... a kind of force_status... at least that's my impression, but I understand if you think it's the other way around

  5. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    i see what you mean (sorry i skimmed the question a bit :))...

    I've noted this down but it might not get done in the next update, will check this out asap.

  6. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    FYI, this has been fixed in the latest dev version and will be in the next update.

  7. leoloso
    Posted 3 years ago #

    awesome, thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.