PDA

View Full Version : Updating original template by product's template


spuffic
05-10-2010, 12:57 PM
I'm trying to update original template with my own, that is in product.
I created template, named that same (humanverify_question), updated product, and could see updated template, it worked fine, then I made changes in template, and while updating product got error:

Invalid SQL:

UPDATE vb_template SET
styleid = -10
WHERE product = 'dd_customproduct' AND styleid = -1;

MySQL Error : Duplicate entry 'humanverify_question--10-template' for key 2

First time it uploaded with styleid = -1, and original template has styleid = -10, in second update it tryed to decrement it to -10 and then got duplicate key error.
Is ti bug, or it's just a wrong way to re-writing original templates?
Version of vBulletin: 4.0.3

Andreas
05-11-2010, 04:11 AM
Don't do that!

If you need to change vbulletin templates provide instructions do do so (Search this, replace with that, etc.).

spuffic
05-11-2010, 02:14 PM
Thanks Andreas, it seems not so convenient, is any other way exist? I mean to update template automaticly.