Sabtu, 15 Desember 2007

How to fix error message "Widget IDs should be unique" ?


Possibly you ever have the pip when doing Edit HTML
at your template code always experience of failure with error message like this :









We were unable to save your template.




Please correct the error below, and submit your template again.



    More than one widget was found with id: HTML1. Widget IDs should be unique.







Or maybe like this:





We were unable to save your template.




Please correct the error below, and submit your template again.



    More than one widget was found with id: Feed1. Widget IDs should be unique.






Error message is same , the different only at ID, that is HTML1 and Feed1.
And that is just an example, ID which emerge possibly HTML2, HTML3, HTML4 etc,
or possibly also Feed2, Feed3, Feed4 etc. Possibly you will feel
to confuse with this error message, because you can't edit your template code.
The question possibly emerge that is what do cause can emerge the error message like that? if I may answer possible it be like this : error message emerge because in your template code is have two widgets or more with same ID. Still confuse? I give an example. For example in your template code have widget code be like this :






<div id='sidebar-wrapper'>

<b:section class='sidebar' id='upsidebar' preferred='yes'>

<b:widget id='HTML1' locked='false' title='' type='HTML'/>

<b:widget id='HTML4' locked='false' title='' type='HTML'/>

<b:widget id='HTML3' locked='false' title='' type='HTML'/>

</b:section>

<b:section class='sidebar' id='sidebar1' preferred='yes'>

<b:widget id='HTML5' locked='false' title='Belajar buat website' type='HTML'/>

<b:widget id=''HTML1' locked='false' title='Free Download' type='HTML'/>

<b:widget id='BlogArchive1' locked='false' title='Arsip Blog' type='BlogArchive'/>

<b:widget id='HTML6' locked='false' title='' type='HTML'/>

<b:widget id='HTML7' locked='false' title='Yang mampir' type='HTML'/>

<b:widget id='HTML8' locked='false' title='Site feed' type='HTML'/>

<b:widget id='HTML9' locked='false' title='' type='HTML'/>

<b:widget id='HTML10' locked='false' title='' type='HTML'/>

</b:section>







At the example above seen two widget codes with the same ID, that is HTML1 (attention the red letter):






<b:widget id='HTML1' locked='false' title='' type='HTML'/>



<b:widget id='HTML1' locked='false' title='Free Download' type='HTML'/>






If the case such as the example, of course you can't Saving your template code because it will always error.
What must be doing if the case like that? you must change one of widget ID with diffrent ID. Example :
change HTML1 with HTML15
or other number, but the number must be different with other widget ID.






<div id='sidebar-wrapper'>

<b:section class='sidebar' id='upsidebar' preferred='yes'>

<b:widget id='HTML1' locked='false' title='' type='HTML'/>

<b:widget id='HTML4' locked='false' title='' type='HTML'/>

<b:widget id='HTML3' locked='false' title='' type='HTML'/>

</b:section>

<b:section class='sidebar' id='sidebar1' preferred='yes'>

<b:widget id='HTML5' locked='false' title='Belajar buat website' type='HTML'/>

<b:widget id='HTML1' locked='false' title='Free Download' type='HTML'/>

<b:widget id='BlogArchive1' locked='false' title='Arsip Blog' type='BlogArchive'/>

<b:widget id='HTML6' locked='false' title='' type='HTML'/>

<b:widget id='HTML7' locked='false' title='Yang mampir' type='HTML'/>

<b:widget id='HTML8' locked='false' title='Site feed' type='HTML'/>

<b:widget id='HTML9' locked='false' title='' type='HTML'/>

<b:widget id='HTML10' locked='false' title='' type='HTML'/>

</b:section>







You just change one of widget ID with different number, example : HTML1 changed with HTML15, for example :






<div id='sidebar-wrapper'>

<b:section class='sidebar' id='upsidebar' preferred='yes'>

<b:widget id='HTML1' locked='false' title='' type='HTML'/>

<b:widget id='HTML4' locked='false' title='' type='HTML'/>

<b:widget id='HTML3' locked='false' title='' type='HTML'/>

</b:section>

<b:section class='sidebar' id='sidebar1' preferred='yes'>

<b:widget id='HTML5' locked='false' title='Belajar buat website' type='HTML'/>

<b:widget id='HTML15' locked='false' title='Free Download' type='HTML'/>

<b:widget id='BlogArchive1' locked='false' title='Arsip Blog' type='BlogArchive'/>

<b:widget id='HTML6' locked='false' title='' type='HTML'/>

<b:widget id='HTML7' locked='false' title='Yang mampir' type='HTML'/>

<b:widget id='HTML8' locked='false' title='Site feed' type='HTML'/>

<b:widget id='HTML9' locked='false' title='' type='HTML'/>

<b:widget id='HTML10' locked='false' title='' type='HTML'/>

</b:section>








If you had changing your widget ID, click Save Template button. And you will never se the error message.





Tidak ada komentar:

Posting Komentar