View Issue Details

IDProjectCategoryView StatusLast Update
0005287OXID eShop (all versions)5. ------ UpdateApp / Update ------public2014-04-14 07:50
ReporterSvenDeichmann Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionwon't fix 
Product Version4.5.0 revision 34568 
Summary0005287: wrong SQL statement for oxrighttocancellegend2 in update 34028.sql
DescriptionThere is a bug in this statement:

#add new conditions
INSERT INTO `oxcontents` (`OXID`, `OXLOADID`, `OXSHOPID`, `OXSNIPPET`, `OXTYPE`, `OXACTIVE`, `OXACTIVE_1`, `OXPOSITION`, `OXTITLE`, `OXCONTENT`, `OXTITLE_1`, `OXCONTENT_1`, `OXACTIVE_2`, `OXTITLE_2`, `OXCONTENT_2`, `OXACTIVE_3`, `OXTITLE_3`, `OXCONTENT_3`, `OXCATID`, `OXFOLDER`, `OXTERMVERSION`, `OXTIMESTAMP`) SELECT md5( concat( RAND(), 'oxrighttocancellegend2', oxshops.oxid, oxshops.oxurl )), 'oxrighttocancellegend2', 1, 1, 0, 1, 1, '', 'Widerrufsrecht Hinweistext', '[{oxifcontent ident="oxagb" object="oCont"}]\r\n Es gelten unsere <a id="orderConfirmAgbBottom" rel="nofollow" href="[{ $oCont->getLink() }]" onclick="window.open(''[{ $oCont->getLink()|oxaddparams:"plain=1"}]'', ''agb_popup'', ''resizable=yes,status=no,scrollbars=yes,menubar=no,width=620,height=400'');return false;" class="fontunderline">Allgemeinen Gesch<E4>ftsbedingungen</a>. \r\n[{/oxifcontent}]\r\n[{oxifcontent ident="oxrightofwithdrawal" object="oCont"}]\r\n Hier finden Sie Einzelheiten zum [{ $oCont->getLink() }].\r\n[{/oxifcontent}]', 'Right to Cancel Legend', '[{oxifcontent ident="oxagb" object="oCont"}] Our general [{ $oCont->getLink() }] apply. \r\n[{/oxifcontent}]\r\n[{oxifcontent ident="oxrightofwithdrawal" object="oCont"}]\r\n Read details about [{ $oCont->getLink() }].\r\n[{/oxifcontent}]', 1, '', '', 1, '', '', '8a142c3e4143562a5.46426637', 'CMSFOLDER_USERINFO', '', '2011-02-25 13:32:56' FROM oxshops;

It inserts the new conditions once for each subshop, but always gives 1 for the shopid so a "duplicate key error" for OXLOADID will occur.

This should be:
INSERT INTO `oxcontents` (`OXID`, `OXLOADID`, `OXSHOPID`, `OXSNIPPET`, `OXTYPE`, `OXACTIVE`, `OXACTIVE_1`, `OXPOSITION`, `OXTITLE`, `OXCONTENT`, `OXTITLE_1`, `OXCONTENT_1`, `OXACTIVE_2`, `OXTITLE_2`, `OXCONTENT_2`, `OXACTIVE_3`, `OXTITLE_3`, `OXCONTENT_3`, `OXCATID`, `OXFOLDER`, `OXTERMVERSION`, `OXTIMESTAMP`) SELECT md5( concat( RAND(), 'oxrighttocancellegend2', oxshops.oxid, oxshops.oxurl )), 'oxrighttocancellegend2', oxshops.oxid, 1, 0, 1, 1, '', 'Widerrufsrecht Hinweistext', '[{oxifcontent ident="oxagb" object="oCont"}]\r\n Es gelten unsere <a id="orderConfirmAgbBottom" rel="nofollow" href="[{ $oCont->getLink() }]" onclick="window.open(''[{ $oCont->getLink()|oxaddparams:"plain=1"}]'', ''agb_popup'', ''resizable=yes,status=no,scrollbars=yes,menubar=no,width=620,height=400'');return false;" class="fontunderline">Allgemeinen Gesch<E4>ftsbedingungen</a>. \r\n[{/oxifcontent}]\r\n[{oxifcontent ident="oxrightofwithdrawal" object="oCont"}]\r\n Hier finden Sie Einzelheiten zum [{ $oCont->getLink() }].\r\n[{/oxifcontent}]', 'Right to Cancel Legend', '[{oxifcontent ident="oxagb" object="oCont"}] Our general [{ $oCont->getLink() }] apply. \r\n[{/oxifcontent}]\r\n[{oxifcontent ident="oxrightofwithdrawal" object="oCont"}]\r\n Read details about [{ $oCont->getLink() }].\r\n[{/oxifcontent}]', 1, '', '', 1, '', '', '8a142c3e4143562a5.46426637', 'CMSFOLDER_USERINFO', '', '2011-02-25 13:32:56' FROM oxshops;
Steps To Reproduce1.install a 4.4.8 shop.
2. create subshops.
run UPDATE_OXID_ESHOP_EE_V.4.4.8_34028_TO_V.4.6.6_54646
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

SvenDeichmann

2013-07-12 13:55

reporter   ~0008902

another problem: in my case INSERT does not work because oxrighttocancellegend2 already existed in the first place

jurate.baseviciene

2014-04-14 07:49

reporter   ~0009833

Hi,

Thanks a lot for submitting this issue, but unfortunately we can not reproduce this issue any more in new updates. This bug is reproducible only from version 4.4.8 TO version 4.6.6, but we does not support this update. If we update shop to version 5.0 or to version 5.1, this problem does not appear. So decision was close the bug


Best regards