Success! Looks like we've fixed this one. According to our records the fix was applied for DSGNR-3591 in a recent build.
  1. #1
    Sencha User
    Join Date
    May 2011
    Location
    Melbourne, Australia
    Posts
    89
    Vote Rating
    7
    Greg Arnott is on a distinguished road

      0  

    Default Duplicate component id(s) detected within same view

    Duplicate component id(s) detected within same view


    Google search.
    About 31,400,000 results (0.53 seconds)

    No results found for "Duplicate component id(s) detected within same view".

    Architect log proves as helpful as Microsoft help files in the 90s.

    Reason I ran a search on this error was, after running a string search on all files in the app folder (-/metadata / and app.js) returned 2 matches for the id mentioned in the log.
    Match 1, view ->
    Code:
               id: 'footerSiteBtn',
    Match 2, controller ->
    Code:
                "#root #footerSiteBtn": {
                    tap: 'onFooterSiteTap'
                },
    Updating another's code from last year has been an eyebrow raiser at times, yet rarely encounter any of the coding practises in the "damn awful" bracket that duplicate ids comes from.

    Anyone have an idea what Architect means by "Duplicate component id(s) detected within same view" refers to single instances in the whole project?

  2. #2
    Sencha User
    Join Date
    May 2011
    Location
    Melbourne, Australia
    Posts
    89
    Vote Rating
    7
    Greg Arnott is on a distinguished road

      0  

    Default


    Trying to convert to itemId yields interesting results.

    Steps taken:
    1. Copy id
    2. Rename id
    3. Paste id into itemId
    4. Attempt to delete / clear any reference to id
    5. Resist temptation to stab self in eye and try 4 again.
    This appears to be a case of Architect trying to be helpful, yet being an ass and blocking one from alterations. Once an id has been set, Architect is not allowing one to switch to another reference format.

    Errors log:
    • The component id "null" has already been used; ids must be unique, please choose a different id or set itemId instead.
    • The component id "" has already been used; ids must be unique, please choose a different id or set itemId instead.
    This message is for clicking clear and for trying to save as empty string - all the while a unique itemId had been set.

  3. #3
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,308
    Vote Rating
    125
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    When clearing id/itemId we should not be checking for null.

    In addition the error message should be providing you which id or itemId is in conflict.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  4. #4
    Sencha User
    Join Date
    May 2011
    Location
    Melbourne, Australia
    Posts
    89
    Vote Rating
    7
    Greg Arnott is on a distinguished road

      0  

    Default


    The error message did provide 2 (unique) ids that were supposedly in conflict.

    To fix this "issue", I recreated the 2 buttons that had ids, copied the id from the bad button and replaced with keyboard mash, pasted id as itemId in new button, applied other settings the originals had (ie hidden: true), then deleted the originals.

    Then in the controller, updated the references from #idname to button['itemId=idname'].

    Architect was happy with these changes.

  5. #5
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,308
    Vote Rating
    125
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    So they were not in conflict?

    Was one set on id and another on itemId?
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  6. #6
    Touch Premium Member
    Join Date
    May 2009
    Posts
    29
    Vote Rating
    0
    rolfdaddy is on a distinguished road

      0  

    Default This is pretty serious - the workaround isn't sufficient in all cases

    This is pretty serious - the workaround isn't sufficient in all cases


    This is a pretty serious bug, that seems to have started after upgrading to Architect from 2.1 to 2.2.0 build 908. Greg's workaround doesn't always work; I am in the situation where I cannot null-out any id's on this simple view:

    Code:
    Ext.define('MyApp.view.DropdownPanel', {
        extend: 'Ext.Panel',
    
        config: {
            height: 100,
            hidden: false,
            id: 'MyDropdownPanel',
            width: 200,
            hideOnMaskTap: true,
            modal: true,
            items: [
                {
                    xtype: 'list',
                    height: '100%',
                    id: 'UserDropdownPanelList',
                    itemId: 'list',
                    itemTpl: [
                        '<div>{title}</div>'
                    ]
                }
            ],
            listeners: [
                {
                    fn: 'onUserDropdownPanelListSelect',
                    event: 'select',
                    delegate: '#UserDropdownPanelList'
                }
            ]
        },
    
        onUserDropdownPanelListSelect: function(dataview, record, eOpts) {
        }
    
    });
    If I try to "null out" either of the two id's I get

    The component id "null" has already been used; ids must be unique, please choose a different id or set itemId instead.

    The same error happens even if I try to set an itemId first. As you can see, there are no other id's in this component. I certainly have other views in the application that have components without id's but that should be fine.

    Please advise on a workaround, since this is a blocker!

    UPDATE: It seems if I close Architect, manually remove the relevant

    "id": null


    lines from the metadata/view/DropdownPanel file, reopen Architect, and then save the project, then I can get unblocked.
    Last edited by rolfdaddy; 29 Mar 2013 at 8:07 AM. Reason: Added workaround

  7. #7
    Sencha - Architect Dev Team dfoelber's Avatar
    Join Date
    Sep 2011
    Location
    Rockville, MD
    Posts
    96
    Vote Rating
    12
    dfoelber will become famous soon enough

      0  

    Default


    Hi all,

    This issue has been fixed and will be included in the next autoupdate.
    David Foelber
    @davidfoelber
    Sencha Architect Development Team

  8. #8
    Touch Premium Member
    Join Date
    May 2009
    Posts
    29
    Vote Rating
    0
    rolfdaddy is on a distinguished road

      0  

    Default


    David, thank you for letting us know, but can you clarify the auto-update process? I don't see any "Check for updates" menu option in Architect, nor have I seen any documentation on this feature. How often are auto-updates pushed? Does it get installed automatically the next time I launch Architect?

  9. #9
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,308
    Vote Rating
    125
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by rolfdaddy View Post
    David, thank you for letting us know, but can you clarify the auto-update process? I don't see any "Check for updates" menu option in Architect, nor have I seen any documentation on this feature. How often are auto-updates pushed? Does it get installed automatically the next time I launch Architect?
    Auto Updates are automatically enabled. The next time we push an auto update it will prompt you to accept/decline the update. I will ping our tech writers to note that we should explain our auto update policies better in our docs. Thanks for the note.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  10. #10
    Sencha User
    Join Date
    May 2011
    Location
    Melbourne, Australia
    Posts
    89
    Vote Rating
    7
    Greg Arnott is on a distinguished road

      0  

    Default


    Quote Originally Posted by aconran View Post
    So they were not in conflict?
    Was one set on id and another on itemId?
    Both were set to id on different components.

    I have recreated the conflicting code here, with footerSiteBtn and footerContactBtn being the conflicting ids. Converting these to itemIds resolved the problem.

    Code:
    Ext.define('App.view.Footer', {
        extend: 'Ext.Panel',
        alias: 'widget.footer',
    
    
        config: {
            itemId: 'footer',
            cls: [
                'v-dividers',
                'padded',
                'site-footer'
            ],
            items: [
                {
                    xtype: 'container',
                    cls: 'footer-ad-container',
                    items: [
                        {
                            xtype: 'image',
                            localizedConfig: {
                                src: 'footer-logo-url'
                            },
                            cls: 'footer-ad',
                            src: '/styles/mobile/images/footer/default-locale/footer.jpg'
                        }
                    ]
                },
                {
                    xtype: 'container',
                    ui: 'plain',
                    layout: {
                        type: 'hbox'
                    },
                    items: [
                        {
                            xtype: 'button',
                            localizedConfig: {
                                text: 'footer-logo-text'
                            },
                            cls: 'footer-home-button',
                            itemId: 'footerHomeBtn',
                            ui: 'plain',
                            iconCls: 'ui_logo',
                            iconMask: true,
                            text: 'Home'
                        },
                        {
                            xtype: 'button',
                            hidden: true,
                            id: 'footerContactBtn',
                            ui: 'plain',
                            text: 'Contact Us'
                        },
                        {
                            xtype: 'spacer'
                        },
                        {
                            xtype: 'button',
                            hidden: true,
                            id: 'footerSiteBtn',
                            ui: 'plain',
                            text: 'Australia'
                        },
                        {
                            xtype: 'button',
                            localizedConfig: {
                                text: 'footer-button-www-text'
                            },
                            cls: 'link-button',
                            itemId: 'footerCountryBtn',
                            ui: 'plain',
                            text: 'Worldwide'
                        }
                    ]
                }
            ]
        }
    });