• Resolved karthik85ul

    (@karthik85ul)


    Hi,

    We get the Duplicate identifier issue when we test the JSON article in apple news preview toll.
    See the example : Error: Duplicate identifier [component-576ba86299031] used.
    document -> components -> [9]

    Basically component-576ba86299031 showing in two different places in the JSON file If suppose I changed the different number for component the issue was resolved.
    Also I have find the issue location \includes\apple-exporter\components\class-component.php line 276. Need to avoid $this->uid duplication to fix this issue.

    This happen for few articles not for all post.

    Karthik

    https://ww.wp.xz.cn/plugins/publish-to-apple-news/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    Can you please provide the JSON file, the full HTML (from the “Text” tab in the WordPress editor) for the post content, and a link to the original post?

    Thanks.

    Thread Starter karthik85ul

    (@karthik85ul)

    See below replay

    Thread Starter karthik85ul

    (@karthik85ul)

    JSON FILE
    {"version":"1.1","identifier":"post-93465","language":"en","title":"Chanel brings high fashion to Cuba in colourful and relaxed catwalk display","documentStyle":{"backgroundColor":"#FAFAFA"},"layout":{"columns":16,"width":1024,"margin":100,"gutter":20},"components":[{"role":"header","layout":"headerPhotoLayout","components":[{"role":"photo","layout":"headerPhotoLayout","URL":"bundle:\/\/cuba.png"}],"behavior":{"type":"parallax","factor":0.8}},{"role":"container","layout":{"columnStart":0,"columnSpan":7,"ignoreDocumentMargin":true},"style":{"backgroundColor":"#FAFAFA"},"components":[{"role":"title","text":"Chanel brings high fashion to Cuba in colourful and relaxed catwalk display","textStyle":"default-title","layout":"title-layout"},{"role":"byline","text":"Admin | Apr 4, 2016 | 3:46 PM","textStyle":"default-byline","layout":"byline-layout"}]},{"role":"body","text":"Chanel has become the first major fashion house to stage a fashion show in the newly opened up [Cuba.](https:\/\/www.lonelyplanet.com\/cuba)\u00a0On Tuesday afternoon [Havana](https:\/\/www.lonelyplanet.com\/cuba\/havana) hosted one of the glitziest parties it has seen since the Castro Regime took over the island in 1959.\u00a0Karl Lagerfeld, the enigmatic creative director for Chanel, brought models and celebrities together to celebrate Resort 2017, a vibrant summer collection that the designer says was inspired by Cuba.","format":"markdown","textStyle":"dropcapBodyStyle","layout":"body-layout"},{"role":"heading1","text":"Belmond Andean Explorer","format":"markdown","textStyle":"default-heading-1","layout":"heading-layout"},{"role":"container","components":[{"role":"photo","URL":"bundle:\/\/AEP-OBS-01-Copy.jpg","layout":"anchored-image","caption":"luxury sleeper train caption by Gary on 20-20-2011"},{"role":"caption","text":"luxury sleeper train caption by Gary on 20-20-2011","textStyle":{"textAlignment":"left","fontSize":16,"fontName":"AvenirNext-Regular"},"layout":{"margin":{"top":20}}}],"anchor":{"targetAnchorPosition":"center","rangeStart":0,"rangeLength":1,"targetComponentIdentifier":"component-576be9166f1d8"},"layout":"anchor-layout-left"},{"role":"heading2","text":"Republic of Ireland","format":"markdown","textStyle":"default-heading-2","layout":"heading-layout"},{"role":"container","components":[{"role":"photo","URL":"bundle:\/\/ire-1024x752.png","layout":"anchored-image","caption":"Ireland Beauty"},{"role":"caption","text":"Ireland Beauty","textStyle":{"textAlignment":"left","fontSize":16,"fontName":"AvenirNext-Regular"},"layout":{"margin":{"top":20}}}],"anchor":{"targetAnchorPosition":"center","rangeStart":0,"rangeLength":1,"targetComponentIdentifier":"component-576be9166f1d8"},"layout":"anchor-layout-left"},{"role":"heading3","text":"American cars brought celebrities","format":"markdown","textStyle":"default-heading-3","layout":"heading-layout"},{"role":"body","text":"Around 100 brightly coloured vintage American cars brought celebrities and models through Havana and to the Paseo del Prado, the famous boulevard that boasts some of the most quintessentially Cuban streetscapes.","format":"markdown","textStyle":"default-body","layout":"body-layout","identifier":"component-576be9166f1d8"},{"role":"body","text":"\u00a0","format":"markdown","textStyle":"default-body","layout":"body-layout","identifier":"component-576be9166f1d8"},{"role":"instagram","URL":"https:\/\/instagram.com\/p\/BE-J36tgEni\/"},{"role":"body","text":"\u00a0\n\nCelebrities attending included actor Tilda Swinton, model Gisele Bundchen, and actor Vin Diesel, as well as a slew of well known international models who walked up and down the Paseo del Prado in uncharacteristically smiling and relaxed fashion rarely seen on catwalks.\n\n\u00a0","format":"markdown","textStyle":"default-body","layout":"body-layout"},{"role":"instagram","URL":"https:\/\/instagram.com\/p\/BE_HqtVgEg0\/"},{"role":"body","text":"\u00a0\n\nThe fashion show is part of a wider series of events that have heralded the total opening up of Cuba. Earlier this week the first cruise ship stopped off in Cuba and was greeted by cheers.\n\n\u00a0","format":"markdown","textStyle":"default-body","layout":"body-layout"},{"role":"instagram","URL":"https:\/\/instagram.com\/p\/BE-K7snRVFL\/"},{"role":"body","text":"\u00a0\n\nWhilst Chanel is not sold in Cuba, the show may indicate a potential flagship store to come.","format":"markdown","textStyle":"default-body","layout":"body-layout-last"}],"componentTextStyles":{"dropcapBodyStyle":{"textAlignment":"left","fontName":"Munged-XvgFJEsU9W","fontSize":13,"lineHeight":16,"textColor":"#2c3643","linkStyle":{"textColor":"#428bca"},"paragraphSpacingBefore":10,"paragraphSpacingAfter":10,"dropCapStyle":{"numberOfLines":4,"numberOfCharacters":1,"padding":5,"fontName":"Georgia-Bold","textColor":"#000000"}},"default-heading-1":{"fontName":"AvenirNext-Bold","fontSize":18,"lineHeight":28,"textColor":"#000000","textAlignment":"center"},"default-heading-2":{"fontName":"AvenirNext-Bold","fontSize":17,"lineHeight":28,"textColor":"#000000","textAlignment":"center"},"default-heading-3":{"fontName":"AvenirNext-Bold","fontSize":16,"lineHeight":28,"textColor":"#000000","textAlignment":"center"},"default-body":{"textAlignment":"left","fontName":"Munged-XvgFJEsU9W","fontSize":13,"lineHeight":18,"textColor":"#2c3643","linkStyle":{"textColor":"#428bca"},"paragraphSpacingBefore":10,"paragraphSpacingAfter":10},"default-title":{"fontName":"Munged-EFpzuYCS36","fontSize":30,"lineHeight":32,"textColor":"#000","textAlignment":"center"},"default-byline":{"textAlignment":"center","fontName":"Munged-fC7HqUX2aV","fontSize":13,"textColor":"#2c3643"},"default-pullquote":{"fontName":"Munged-FJssujHZdn","fontSize":42,"textColor":"#2C3641","textTransform":"uppercase","lineHeight":48,"textAlignment":"center"},"author-byline":{"fontName":"Munged-DPMWPmQdSq","fontSize":14,"textColor":"#2c3643","textAlignment":"center","lineHeight":18,"textTransform":"uppercase"},"author-org-byline":{"fontName":"Munged-DPMWPmQdSq","fontSize":13,"fontStyle":"italic","fontFaces":"bold-italic","textColor":"#b6c3ca","textAlignment":"center"},"lp-byline":{"fontName":"Munged-fC7HqUX2aV","fontSize":18,"textColor":"#b6c3ca","lineHeight":22,"textAlignment":"center"},"header-title":{"fontName":"Munged-DPMWPmQdSq","fontSize":36,"lineHeight":40,"textColor":"#fff","textAlignment":"center","textTransform":"capitalize","columnStart":1,"columnSpan":13,"margin":{"top":10,"bottom":50,"left":12,"right":12}}},"componentLayouts":{"body-layout":{"columnStart":1,"columnSpan":12,"margin":{"top":10,"bottom":30}},"body-layout-last":{"columnStart":1,"columnSpan":7,"margin":{"top":12,"bottom":30}},"heading-layout":{"columnStart":1,"columnSpan":12,"margin":{"top":20,"bottom":0},"textAlignment":"center"},"anchored-image":{"margin":{"top":0,"bottom":3,"fontName":"Munged-DPMWPmQdSq","fontSize":10,"textColor":"#666666,"textAlignment":"center"}},"anchor-layout-left":{"columnStart":0,"columnSpan":15},"headerPhotoLayout":{"columnStart":0,"columnSpan":16,"ignoreDocumentMargin":true,"minimumHeight":"65vh","margin":{"top":0,"bottom":0}},"title-layout":{"margin":{"top":5,"bottom":0},"columnSpan":15},"byline-layout":{"columnStart":0,"columnSpan":15,"margin":{"top":5,"bottom":0},"caption-layout":{"margin":{"top":2,"bottom":2}},"imageContainerLayout":{"columnStart":0,"columnSpan":6,"ignoreDocumentMargin":true,"margin":{"top":8,"bottom":8}},"caption-style":{"fontName":"Munged-DPMWPmQdSq","fontSize":10,"textColor":"#2c3643","textAlignment":"center","margin":{"top":4,"bottom":8}}},"author-avatar":{"columnStart":5,"columnSpan":2,"ignoreDocumentMargin":true,"margin":{"top":0,"bottom":30}},"quote-layout":{"margin":{"top":15,"bottom":15}},"anchor-layout-right":{"columnStart":3,"columnSpan":5},"headerContainerLayout":{"columnStart":0,"columnSpan":16,"ignoreDocumentMargin":true,"minimumHeight":"65vh","margin":{"top":0,"bottom":0}},"imageContainerLayout":{"columnStart":0,"columnSpan":6,"ignoreDocumentMargin":true,"margin":{"top":8,"bottom":8}},"headerTitleLayout":{"columnStart":1,"columnSpan":14,"ignoreDocumentMargin":true,"margin":{"top":50,"bottom":20}}},"metadata":{"excerpt":"Chanel has become the first major fashion house to stage a fashion show in the newly opened up Cuba.\u00a0On Tuesday afternoon Havana hosted one of the glitziest parties it has seen since the Castro Regime took over the island in 1959.\u00a0Karl Lagerfeld, the enigmatic creative director for Chanel, brought models and celebrities together to celebrate...","thumbnailURL":"bundle:\/\/cuba.png","dateCreated":"2016-04-04T15:46:34+00:00","dateModified":"2016-06-22T14:34:39+00:00","datePublished":"2016-04-04T15:46:34+00:00","canonicalURL":"http:\/\/localhost\/News\/chanel-brings-high-fashion-to-cuba-in-colourful-catwalk-display\/","generatorIdentifier":"publish-to-apple-news","generatorName":"Publish to Apple News","generatorVersion":"1.1.4"},"advertisingSettings":{"frequency":1,"layout":{"margin":{"top":15,"bottom":15}}},"default-heading-1":{"fontName":"Munged-DPMWPmQdSq","fontSize":15,"textColor":"#000000","textAlignment":"center","margin":0},"default-heading-2":{"fontName":"Munged-DPMWPmQdSq","fontSize":15,"textColor":"#000000","textAlignment":"center","margin":0},"default-heading-3":{"fontName":"Munged-DPMWPmQdSq","fontSize":15,"textColor":"#000000","textAlignment":"center","margin":0},"default-heading-4":{"fontName":"Munged-DPMWPmQdSq","fontSize":15,"textColor":"#000000","textAlignment":"center","margin":0}}

    HTML CODE

    Chanel has become the first major fashion house to stage a fashion show in the newly opened up <a href="https://www.lonelyplanet.com/cuba" target="_blank">Cuba.</a> On Tuesday afternoon <a href="https://www.lonelyplanet.com/cuba/havana" target="_blank">Havana</a> hosted one of the glitziest parties it has seen since the Castro Regime took over the island in 1959. Karl Lagerfeld, the enigmatic creative director for Chanel, brought models and celebrities together to celebrate Resort 2017, a vibrant summer collection that the designer says was inspired by Cuba.
    <h1>Belmond Andean Explorer</h1>
    [caption id="attachment_101172" align="alignnone" width="1024"]<a href="http://www.lonelyplanet.com/news/aep-obs-01-copy/"><img class="wp-image-101172 size-full" src="http://www.lonelyplanet.com/news/wp-content/uploads/2016/06/AEP-OBS-01-Copy.jpg" alt="luxury sleeper train" width="1024" height="752" /></a> luxury sleeper train caption by Gary on 20-20-2011[/caption]
    <h2>Republic of Ireland</h2>
    [caption id="attachment_93554" align="alignnone" width="1024"]<img class="wp-image-93554 size-large" src="http://localhost/News/wp-content/uploads/2016/04/ire-1024x752.png" alt="Ireland Beauty" width="1024" height="752" /> Ireland Beauty[/caption]
    <h3>American cars brought celebrities</h3>
    Around 100 brightly coloured vintage American cars brought celebrities and models through Havana and to the Paseo del Prado, the famous boulevard that boasts some of the most quintessentially Cuban streetscapes.
    
    &nbsp;
    <blockquote class="instagram-media" style="background: #FFF; border: 0; border-radius: 3px; box-shadow: 0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width: 658px; padding: 0; width: calc(100% - 2px);" data-instgrm-captioned="" data-instgrm-version="6">
    <div style="padding: 8px;">
    <div style="background: #F8F8F8; line-height: 0; margin-top: 40px; padding: 50.0% 0; text-align: center; width: 100%;"></div>
    <a style="color: #000; font-family: Arial,sans-serif; font-size: 14px; font-style: normal; font-weight: normal; line-height: 17px; text-decoration: none; word-wrap: break-word;" href="https://www.instagram.com/p/BE-J36tgEni/" target="_blank">#ChanelCruiseCuba #CocoCuba</a>
    
    A photo posted by CHANEL (@chanelofficial) on <time style="font-family: Arial,sans-serif; font-size: 14px; line-height: 17px;" datetime="2016-05-04T04:01:01+00:00">May 3, 2016 at 9:01pm PDT</time>
    
    </div></blockquote>
    <script src="//platform.instagram.com/en_US/embeds.js" async="" defer="defer"></script>
    
    &nbsp;
    
    Celebrities attending included actor Tilda Swinton, model Gisele Bundchen, and actor Vin Diesel, as well as a slew of well known international models who walked up and down the Paseo del Prado in uncharacteristically smiling and relaxed fashion rarely seen on catwalks.
    
    &nbsp;
    
    <blockquote class="instagram-media" style="background: #FFF; border: 0; border-radius: 3px; box-shadow: 0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width: 658px; padding: 0; width: calc(100% - 2px);" data-instgrm-captioned="" data-instgrm-version="6">
    <div style="padding: 8px;">
    <div style="background: #F8F8F8; line-height: 0; margin-top: 40px; padding: 50.0% 0; text-align: center; width: 100%;"></div>
    
    <a style="color: #000; font-family: Arial,sans-serif; font-size: 14px; font-style: normal; font-weight: normal; line-height: 17px; text-decoration: none; word-wrap: break-word;" href="https://www.instagram.com/p/BE_HqtVgEg0/" target="_blank">#ChanelCruiseCuba #CocoCuba</a>
    
    A photo posted by CHANEL (@chanelofficial) on <time style="font-family: Arial,sans-serif; font-size: 14px; line-height: 17px;" datetime="2016-05-04T13:00:58+00:00">May 4, 2016 at 6:00am PDT</time>
    </div></blockquote>
    
    <script src="//platform.instagram.com/en_US/embeds.js" async="" defer="defer"></script>
    
    &nbsp;
    
    The fashion show is part of a wider series of events that have heralded the total opening up of Cuba. Earlier this week the first cruise ship stopped off in Cuba and was greeted by cheers.
    
    &nbsp;
    <blockquote class="instagram-media" style="background: #FFF; border: 0; border-radius: 3px; box-shadow: 0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width: 658px; padding: 0; width: calc(100% - 2px);" data-instgrm-captioned="" data-instgrm-version="6">
    <div style="padding: 8px;">
    <div style="background: #F8F8F8; line-height: 0; margin-top: 40px; padding: 62.4537037037% 0; text-align: center; width: 100%;"></div>
    <a style="color: #000; font-family: Arial,sans-serif; font-size: 14px; font-style: normal; font-weight: normal; line-height: 17px; text-decoration: none; word-wrap: break-word;" href="https://www.instagram.com/p/BE-K7snRVFL/" target="_blank">The @chanelofficial Cuba Resort 2017 show took place outside in Havana’s Paseo del Prado, a street on the dividing line between Old and New Havana. Click the link in our bio for more highlights.</a>
    
    A photo posted by Vogue Runway (@voguerunway) on <time style="font-family: Arial,sans-serif; font-size: 14px; line-height: 17px;" datetime="2016-05-04T04:10:16+00:00">May 3, 2016 at 9:10pm PDT</time>
    
    </div></blockquote>
    <script src="//platform.instagram.com/en_US/embeds.js" async="" defer="defer"></script>
    
    &nbsp;
    
    Whilst Chanel is not sold in Cuba, the show may indicate a potential flagship store to come.

    Still we are in development so the website not in live sorry unabel to provide the link.

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    Thanks, we’ll look into it though it may take some time before we can provide feedback.

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    I think we found the source of the issue and it’s a PHP thing, not even a WordPress issue. We’re considering potential fixes for it.

    Thread Starter karthik85ul

    (@karthik85ul)

    That’s Great. Looking forward to see the fix.

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    Version 1.1.5 just released and should resolve your issue. Let us know if not.

    Thread Starter karthik85ul

    (@karthik85ul)

    Tat’s great the issue was resolved. Thanks you so much.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Duplicate identifier in Components’ is closed to new replies.