ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Disable Member Data in Channel Tag

September 24, 2012 4:21pm

Subscribe [1]
  • #1 / Sep 24, 2012 4:21pm

    MediaGirl Inc.

    186 posts

    Seems like there is a bug in the disable parameter.

    With “member_data” set to be disabled with this tag:

    {exp:channel:entries channel="static-content" entry_id="170252" dynamic="no" disable="categories|member_data|pagination|category_fields"}
     {page-copy}
    {/exp:channel:entries}

    I’m seeing member data collected in the query.

    SELECT  t.entry_id, t.channel_id, t.forum_topic_id, t.author_id, t.ip_address, t.title, t.url_title, t.status, t.dst_enabled, t.view_count_one, t.view_count_two, t.view_count_three, t.view_count_four, t.allow_comments, t.comment_expiration_date, t.sticky, t.entry_date, t.year, t.month, t.day, t.edit_date, t.expiration_date, t.recent_comment_date, t.comment_total, t.site_id as entry_site_id,
                            w.channel_title, w.channel_name, w.channel_url, w.comment_url, w.comment_moderate, w.channel_html_formatting, w.channel_allow_img_urls, w.channel_auto_link_urls, w.comment_system_enabled, 
                            m.username, m.email, m.url, m.screen_name, m.location, m.occupation, m.interests, m.aol_im, m.yahoo_im, m.msn_im, m.icq, m.signature, m.sig_img_filename, m.sig_img_width, m.sig_img_height, m.avatar_filename, m.avatar_width, m.avatar_height, m.photo_filename, m.photo_width, m.photo_height, m.group_id, m.member_id, m.bday_d, m.bday_m, m.bday_y, m.bio,
                            md.*,
                            wd.*
                    FROM exp_channel_titles        AS t
                    LEFT JOIN exp_channels         AS w  ON t.channel_id = w.channel_id
                    LEFT JOIN exp_channel_data    AS wd ON t.entry_id = wd.entry_id
                    LEFT JOIN exp_members        AS m  ON m.member_id = t.author_id
                    LEFT JOIN exp_member_data    AS md ON md.member_id = m.member_id WHERE t.entry_id IN (170252) ORDER BY t.sticky desc, t.entry_date desc, t.entry_id desc

    Is this a bug?

  • #2 / Sep 25, 2012 3:46pm

    Kevin Smith

    4784 posts

    Hi Anna,

    It’s not a bug, though it does present a good opportunity for improved optimization. We actually had a good discussion about this over here a few months back. Hope that helps enlighten a bit!

  • #3 / Sep 25, 2012 3:51pm

    MediaGirl Inc.

    186 posts

    This should absolutely be improved. Did it get put on the fix list after that forum post in July?

    That channel query is a bear and disabling member_data should disable it completely. What’s the ETA for the change?

    Anna

  • #4 / Sep 25, 2012 3:52pm

    MediaGirl Inc.

    186 posts

    Also, what is disabled when member_data is set? Seems like these would be the normal queries that would run if member_data wasn’t disabled.

    Anna

  • #5 / Sep 26, 2012 2:00pm

    Kevin Smith

    4784 posts

    Hi Anna,

    We don’t have an ETA for when that improvement will arrive. For now, disabling member_data cuts out the part of processing the channel entries tag where custom member fields are fetched. The specific part that’s cut out is the fetch_custom_member_fields() function in mod.channel.php.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases