Usage

Go to the module Admin tools > Grid migration:

"Grid migration" Module

What grid elements do i have on my site?

Click on click here in the important notice box in the first step. After that the extension analyzes your page and also gives you first instructions.

Analyse the website

Migrate grid elements from gridelements layout key

Click on Migration form gridelements layout key in the dropdown to migrate all elements on the web page using layout key.

Migrate all from layout key

Migrate grid elements with upgrade wizard

You can use the new Abstract Upgrater for an automated migration. For this you only have to register your UpgradeWizards in the Services.yaml.

Load the upgrater into your upgrade function as follows:

EXT:gridtocontainer/Classes/Upgrades/AbstractGridtoCoUpdater.php
use SBublies\Gridtocontainer\Upgrades\AbstractGridtoCoUpdater
Copied!

Add your own upgrater in your own extension as follows:

EXT:your_extension/Classes/Upgrades/GridelementUpdaterExample.php
namespace VENDOR\EXTENSION\Upgrades;

use TYPO3\CMS\Install\Attribute\UpgradeWizard;
   use SBublies\Gridtocontainer\Upgrades\AbstractGridtoCoUpdater
#[UpgradeWizard('gridtocontainer_GridelementUpdaterExample')]

class GridelementUpdaterExample extends AbstractGridtoCoUpdater
{
	protected const GRID_IDENTIFIER = 'updaterexample';
	protected const CONTAINER_IDENTIFIER = 'container_updaterexample';
	protected const FLEXFORM_IDENTIFIER = 'old';
	protected const OLD_COLUMS = '0,1';
	protected const NEW_COLUMS = '10000,10001';
}
Copied!

Clean up the database

Search in the database for content elements that still use the colpos -1:

SELECT * FROM tt_content where colpos=-1;
Copied!

In most cases all content elements that had been deleted in TYPO3 can also be deleted from the database.

DELETE FROM tt_content where colpos=-1 and deleted=1;
Copied!

Then make a database compare at Admin tools > Maintenance > Analyze Database.