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.

Weird duplicate entry, not in the database

November 26, 2009 1:56am

Subscribe [3]
  • #1 / Nov 26, 2009 1:56am

    On a client’s site, one entry out of about 200 is appearing twice when I loop through the entries to create an XML file.

    I checked the control panel as well as the exp_weblog_titles table and only see one occurrence of this entry (# 157).

    The code being used is:

    <members>{exp:weblog:entries weblog="businesses" disable="comments|member_data|pagination|trackbacks" limit="500" orderby="title" sort="asc"}
        <member member_id="{entry_id}" pid="{pid}" url="{title_permalink="businesses"}" url_title="{url_title}" map_category="{map_category}">
            <title><![CDATA[{exp:plaintext:convert}{title}{/exp:plaintext:convert}]]></title>
            <snippet><![CDATA[{exp:plaintext:convert}{business_snippet}{/exp:plaintext:convert}]]></snippet>
            <body><![CDATA[{business_body}]]></body>
            <address><![CDATA[{exp:plaintext:convert}{street_address}{/exp:plaintext:convert}]]></address>
            <updated>{edit_date format="{DATE_ATOM}"}</updated>
            <categories><category id="{if map_category == 'Shop' }1{if:elseif map_category == 'Dine' }2{if:elseif map_category == 'Work' }3{if:elseif map_category == 'Play' }4{/if}">{exp:xml_encode}{map_category}{/exp:xml_encode}</category></categories>
        </member>{/exp:weblog:entries}
    </members>

    Has anyone run into this before?

  • #2 / Nov 26, 2009 4:31am

    silenz

    1651 posts

    The {entry_id} is also identical in both occurrences?

  • #3 / Nov 26, 2009 1:48pm

    Lisa Wess

    20502 posts

    Please check your exp_member* tables for duplicate member data, that is the most common cause of this.

  • #4 / Nov 26, 2009 3:39pm

    silenz

    1651 posts

    Member data? These are weblog entries.

  • #5 / Nov 26, 2009 4:40pm

    Lisa Wess

    20502 posts

    I realize that, silenz.  However if there are duplicate members IDs then it will cause duplicate entries to show on the front-end even though they don’t really exist.  It’s come up several times on the forums over the years.  =)

  • #6 / Nov 26, 2009 5:35pm

    silenz

    1651 posts

    Good to know.

  • #7 / Nov 26, 2009 11:54pm

    Please check your exp_member* tables for duplicate member data, that is the most common cause of this.

    I went through all of the exp_member tables and didn’t find any dupes.

    It’s really odd to me that it would just be one record; I’d expect a whole lot of dupes if it was a bad query JOIN.

  • #8 / Nov 27, 2009 12:27am

    Your suggestion put me on the right track, Lisa, thanks.  There were two entries with entry_id=157 in the exp_weblog_data table.

    They’re gone now, and all is well.  Cheers.

  • #9 / Nov 27, 2009 2:54am

    Ingmar

    29245 posts

    Excellent news 😊 Please don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases