View Issue Details

IDProjectCategoryView StatusLast Update
0004025OXID eShop (all versions)2.3. Extensions (modules, themes)public2014-01-09 15:33
Reporterb.hasis Assigned To 
PriorityhighSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.6.0 revision 44406 
Target Version4.7.11 / 5.0.11Fixed in Version4.7.11 / 5.0.11 
Summary0004025: no update of tbl:oxtplblocks by changing module/metadata.php 'blocks' => array()
DescriptionIf you change block settings in module/metadata.php they are no update of allready exists entries, and new entries in your 'blocks' => array() doesnt insert in Database:oxtplblocks. So its not Possible to patch your Modules.
Steps To ReproduceCreate a Module with metadata.php
Insert a block
Activate that Module in adminarea
add and update a block in metadata.php

You will see no change in Database:oxtplblocks

Deactivate/Activate that Module doesnt help.
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Relationships

has duplicate 0004866 resolvedLinas Kukulskis Start page header element (including CSS) disappear after ruining installed PayPal module. 
related to 0004129 resolvedLinas Kukulskis metadata.php changes are not committed right to aModules 
related to 0005270 resolvedmantas.vaitkunas after deactivation still data in db 
child of 0004942 closedSvenBrunk Changing Module ID will move old module(id) to aDiabledModules and let them stay there until the module directory is deleted 

Activities

dainius.bigelis

2012-05-22 10:11

reporter   ~0006665

The module handling functionality will be improved for more detailed handling of module entries into DB. Currently it just checks if there are any entries for this module in i.e. oxtplblocks table and if there are - does not insert new entries on module activation.
So for now as workaround - you need just delete entries with your module ID from oxtplblocks table and Activate module once again (then it will insert latest entries from metadata file).
We will implement more detailed check for those entries in DB in one of soonest eShop versions.

cata.vancea

2012-07-02 17:02

reporter   ~0007041

Yes, the only solution for fixing it is to remove entries manually from oxtplblocks and reactivate the modules

b.hasis

2013-07-08 13:09

reporter   ~0008881

Hi people,

so, at the moment i get sick by
executing "delete from oxtplblocks where OXMODULE = 'module_id'".

So, if you only want to press deactivate / active to refresh the Blocks of the module, do this:

go to oxmodule::activate() at make this:

            $this->_addTemplateBlocks( $this->getInfo("blocks") );

            // checking if module has tpl blocks and they are installed
            /*if ( !$this->_hasInstalledTemplateBlocks($sModuleId) ) {
                // installing module blocks
                $this->_addTemplateBlocks( $this->getInfo("blocks") );
            } else {
                //activate oxblocks
                $this->_changeBlockStatus( $sModuleId, "1" );
            }*/
Than go to oxmodule::_addTemplateBlocks() and add this

$oDb->execute("DELETE FROM oxtplblocks WHERE OXMODULE = '{$sModuleId}' and OXSHOPID = '{$sShopId}'"); after
$oDb = oxDb::getDb();

But you will lose your oxpos for the blocks.

ray

2013-07-09 12:20

reporter   ~0008884

there is a nice module available including the needed function to delete oxtplblocks:

http://vanilla-thunder.github.io/vt-devutils/

Linas Kukulskis

2014-01-09 15:33

reporter   ~0009398

on deactivation all block will be removed from db