Support

Home Forums Event Espresso Premium Event category archive is displaying ended events and lack values in post object

Event category archive is displaying ended events and lack values in post object

Posted: November 26, 2014 at 2:22 am

Viewing 3 reply threads


tigerton

November 26, 2014 at 2:22 am

Hi!

I’ve got a custom theme where the interactions with EE are loosely based on your arabicatheme. However the important stuff are basically the same. It’s a standard wp loop etc. etc.

There’s no taxonomy-archive for the category archives, they use the base archive template.

When the template is being used for anything but the category archive everything works as expected. But as soon as it is used to display a category archive the $post object these things happen:
1. Expired events are showing (it’s been turned off in the admin)
2. The order of the events seem to be based on publish date rather than event start date
3. The $post object lacks many of the supposed EE values that should be there. For instance I’m using the EE_EVT_start value for showing the startdate in a custom fashion which works fine except on the category archive where the value doesn’t even exist!

Here’s an example of a $post object in a category archive


[26-Nov-2014 09:08:07 UTC] WP_Post Object
(
    [ID] => 312
    [post_author] => 1
    [post_date] => 2014-10-06 15:38:52
    [post_date_gmt] => 2014-10-06 13:38:52
    [post_content] => Nulla vitae elit libero, a pharetra augue. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Nullam quis risus eget urna mollis ornare vel eu leo. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Aenean lacinia bibendum nulla sed consectetur.

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Cras mattis consectetur purus sit amet fermentum. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.

Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec id elit non mi porta gravida at eget metus. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Nullam quis risus eget urna mollis ornare vel eu leo.

Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
    [post_title] => Kort händelse i historien!
    [post_excerpt] => 
    [post_status] => publish
    [comment_status] => open
    [ping_status] => open
    [post_password] => 
    [post_name] => kort-handelse-historien
    [to_ping] => 
    [pinged] => 
    [post_modified] => 2014-10-06 15:38:52
    [post_modified_gmt] => 2014-10-06 13:38:52
    [post_content_filtered] => 
    [post_parent] => 0
    [guid] => http://www.tigertonhost.se/~kfsk/?post_type=espresso_events&p=312
    [menu_order] => 0
    [post_type] => espresso_events
    [post_mime_type] => 
    [comment_count] => 0
    [filter] => raw
    [EVTM_ID] => 4
    [EVT_ID] => 312
    [EVT_display_desc] => 0
    [EVT_display_ticket_selector] => 1
    [EVT_visible_on] => 2014-10-06 13:38:52
    [EVT_default_registration_status] => RPP
    [EVT_phone] => 
    [EVT_additional_limit] => 10
    [EVT_member_only] => 0
    [EVT_allow_overflow] => 0
    [EVT_timezone_string] => 
    [EVT_external_URL] => 
    [EVT_donations] => 0
    [EE_Event] => EE_Event Object
        (
            [_Primary_Datetime:protected] => 
            [_feature_image:protected] => Array
                (
                )

            [_props_n_values_provided_in_constructor:EE_Base_Class:private] => Array
                (
                    [EVT_ID] => 312
                    [EVT_wp_user] => 1
                    [EVT_created] => 2014-10-06 15:38:52
                    [EVT_desc] => Nulla vitae elit libero, a pharetra augue. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Nullam quis risus eget urna mollis ornare vel eu leo. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Aenean lacinia bibendum nulla sed consectetur.

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Cras mattis consectetur purus sit amet fermentum. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.

Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec id elit non mi porta gravida at eget metus. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Nullam quis risus eget urna mollis ornare vel eu leo.

Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
                    [EVT_name] => Kort händelse i historien!
                    [EVT_short_desc] => 
                    [status] => publish
                    [EVT_slug] => kort-handelse-historien
                    [EVT_modified] => 2014-10-06 15:38:52
                    [parent] => 0
                    [EVT_order] => 0
                    [EVT_display_desc] => 0
                    [EVT_display_ticket_selector] => 1
                    [EVT_visible_on] => 2014-10-06 13:38:52
                    [EVT_default_registration_status] => RPP
                    [EVT_phone] => 
                    [EVT_additional_limit] => 10
                    [EVT_member_only] => 0
                    [EVT_allow_overflow] => 0
                    [EVT_timezone_string] => 
                    [EVT_external_URL] => 
                    [EVT_donations] => 0
                )

            [_timezone:protected] => Europe/Stockholm
            [_dt_frmt:protected] => Y-m-d
            [_tm_frmt:protected] => G:i
            [_cached_properties:protected] => Array
                (
                )

            [_model_relations:protected] => Array
                (
                    [Registration] => Array
                        (
                        )

                    [Datetime] => Array
                        (
                        )

                    [Question_Group] => Array
                        (
                        )

                    [Venue] => Array
                        (
                        )

                    [Term_Taxonomy] => Array
                        (
                        )

                    [Message_Template_Group] => Array
                        (
                        )

                    [Attendee] => Array
                        (
                        )

                    [Extra_Meta] => Array
                        (
                        )

                )

            [_fields:protected] => Array
                (
                    [EVT_ID] => 312
                    [EVT_wp_user] => 1
                    [EVT_created] => 1412609932
                    [EVT_desc] => Nulla vitae elit libero, a pharetra augue. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Nullam quis risus eget urna mollis ornare vel eu leo. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Aenean lacinia bibendum nulla sed consectetur.

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Cras mattis consectetur purus sit amet fermentum. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.

Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec id elit non mi porta gravida at eget metus. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Nullam quis risus eget urna mollis ornare vel eu leo.

Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
                    [EVT_name] => Kort händelse i historien!
                    [EVT_short_desc] => 
                    [status] => publish
                    [EVT_slug] => kort-handelse-historien
                    [EVT_modified] => 1412609932
                    [parent] => 0
                    [EVT_order] => 0
                    [EVT_display_desc] => 0
                    [EVT_display_ticket_selector] => 1
                    [EVT_visible_on] => 1412602732
                    [EVT_default_registration_status] => RPP
                    [EVT_phone] => 
                    [EVT_additional_limit] => 10
                    [EVT_member_only] => 0
                    [EVT_allow_overflow] => 0
                    [EVT_timezone_string] => 
                    [EVT_external_URL] => 
                    [EVT_donations] => 0
                )

            [_Extra_Meta:protected] => 
        )

)

And here’s one where everything is there:


[26-Nov-2014 09:24:30 UTC] WP_Post Object
(
    [ID] => 265
    [post_author] => 1
    [post_date] => 2014-09-17 08:14:30
    [post_date_gmt] => 2014-09-17 08:14:30
    [post_content] => Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum id ligula porta felis euismod semper. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Cras mattis consectetur purus sit amet fermentum.

Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Curabitur blandit tempus porttitor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
    [post_title] => Sit Commodo Ridiculus Malesuada Egestas
    [post_excerpt] => 
    [post_status] => publish
    [comment_status] => open
    [ping_status] => open
    [post_password] => 
    [post_name] => sit-commodo-ridiculus-malesuada-egestas
    [to_ping] => 
    [pinged] => 
    [post_modified] => 2014-09-25 11:23:38
    [post_modified_gmt] => 2014-09-25 09:23:38
    [post_content_filtered] => 
    [post_parent] => 0
    [guid] => http://www.tigertonhost.se/~kfsk/?post_type=espresso_events&p=265
    [menu_order] => 0
    [post_type] => espresso_events
    [post_mime_type] => 
    [comment_count] => 0
    [filter] => raw
    [DTT_ID] => 2
    [EVT_ID] => 265
    [DTT_name] => 
    [DTT_description] => 
    [DTT_EVT_start] => 2014-11-29 08:00:00
    [DTT_EVT_end] => 2014-11-29 17:00:00
    [DTT_reg_limit] => -1
    [DTT_sold] => 0
    [DTT_is_primary] => 0
    [DTT_order] => 1
    [DTT_parent] => 0
    [DTT_deleted] => 0
    [EVTM_ID] => 2
    [EVT_display_desc] => 0
    [EVT_display_ticket_selector] => 1
    [EVT_visible_on] => 2014-09-17 08:14:30
    [EVT_default_registration_status] => RPP
    [EVT_phone] => 
    [EVT_additional_limit] => 10
    [EVT_member_only] => 0
    [EVT_allow_overflow] => 0
    [EVT_timezone_string] => 
    [EVT_external_URL] => 
    [EVT_donations] => 0
    [EE_Event] => EE_Event Object
        (
            [_Primary_Datetime:protected] => 
            [_feature_image:protected] => Array
                (
                )

            [_props_n_values_provided_in_constructor:EE_Base_Class:private] => Array
                (
                    [EVT_ID] => 265
                    [EVT_wp_user] => 1
                    [EVT_created] => 2014-09-17 08:14:30
                    [EVT_desc] => Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum id ligula porta felis euismod semper. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Cras mattis consectetur purus sit amet fermentum.

Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Curabitur blandit tempus porttitor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
                    [EVT_name] => Sit Commodo Ridiculus Malesuada Egestas
                    [EVT_short_desc] => 
                    [status] => publish
                    [EVT_slug] => sit-commodo-ridiculus-malesuada-egestas
                    [EVT_modified] => 2014-09-25 11:23:38
                    [parent] => 0
                    [EVT_order] => 0
                    [EVT_display_desc] => 0
                    [EVT_display_ticket_selector] => 1
                    [EVT_visible_on] => 2014-09-17 08:14:30
                    [EVT_default_registration_status] => RPP
                    [EVT_phone] => 
                    [EVT_additional_limit] => 10
                    [EVT_member_only] => 0
                    [EVT_allow_overflow] => 0
                    [EVT_timezone_string] => 
                    [EVT_external_URL] => 
                    [EVT_donations] => 0
                )

            [_timezone:protected] => Europe/Stockholm
            [_dt_frmt:protected] => Y-m-d
            [_tm_frmt:protected] => G:i
            [_cached_properties:protected] => Array
                (
                )

            [_model_relations:protected] => Array
                (
                    [Registration] => Array
                        (
                        )

                    [Datetime] => Array
                        (
                        )

                    [Question_Group] => Array
                        (
                        )

                    [Venue] => Array
                        (
                        )

                    [Term_Taxonomy] => Array
                        (
                        )

                    [Message_Template_Group] => Array
                        (
                        )

                    [Attendee] => Array
                        (
                        )

                    [Extra_Meta] => Array
                        (
                        )

                )

            [_fields:protected] => Array
                (
                    [EVT_ID] => 265
                    [EVT_wp_user] => 1
                    [EVT_created] => 1410941670
                    [EVT_desc] => Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum id ligula porta felis euismod semper. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Cras mattis consectetur purus sit amet fermentum.

Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec ullamcorper nulla non metus auctor fringilla. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Curabitur blandit tempus porttitor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
                    [EVT_name] => Sit Commodo Ridiculus Malesuada Egestas
                    [EVT_short_desc] => 
                    [status] => publish
                    [EVT_slug] => sit-commodo-ridiculus-malesuada-egestas
                    [EVT_modified] => 1411644218
                    [parent] => 0
                    [EVT_order] => 0
                    [EVT_display_desc] => 0
                    [EVT_display_ticket_selector] => 1
                    [EVT_visible_on] => 1410941670
                    [EVT_default_registration_status] => RPP
                    [EVT_phone] => 
                    [EVT_additional_limit] => 10
                    [EVT_member_only] => 0
                    [EVT_allow_overflow] => 0
                    [EVT_timezone_string] => 
                    [EVT_external_URL] => 
                    [EVT_donations] => 0
                )

            [_Extra_Meta:protected] => 
        )

)

I have WordPress 4.0.1, EE 4.4.5.P etc. (all the latest versions except betas)

Thanks!

Best regards
Jonathan


Josh

  • Support Staff

November 26, 2014 at 1:36 pm

Hi Jonathan,

It turns out that Brent fixed this upstream. Here’s a few links to the commits where the work was done in the github repo:

https://github.com/eventespresso/event-espresso-core/commit/ae95e2dddfe0efe5d9eda93e9571756d01af9cb7

https://github.com/eventespresso/event-espresso-core/commit/3e8906678a5142f58fcdd99a1c7fef3a7ac3e805


tigerton

November 27, 2014 at 12:37 am

Hi Josh,

alright great! I’m guessing it’ll be merged into either 4.4.6 or 4.5 then. I can probably wait for that but if not I’ll just apply the changes to my own files in the meantime.

Thanks!


Dean

November 27, 2014 at 1:15 am

Hi,

It has been merged into 4.4.6.

Viewing 3 reply threads

The support post ‘Event category archive is displaying ended events and lack values in post object’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso