We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running this script in a MM2 installation while upgrading from MM 1.x returns errors with the following functions that are removed in MM2:
line 161: return \MetaModels\Factory::byTableName($nameOrId); line 190: $arrMetaModels = \MetaModels\Factory::getAllTables();
return \MetaModels\Factory::byTableName($nameOrId);
$arrMetaModels = \MetaModels\Factory::getAllTables();
Is it possible to fix it? ;-)
The text was updated successfully, but these errors were encountered:
It is - however I wonder if it is worth the hassle as everyone should have upgraded already a long time ago.
Sorry, something went wrong.
@johannes-bittner pls write a part for MM manual
Alternative from https://community.contao.org/de/showthread.php?84149-Update-Images-von-MM-1-gt-2-x&p=565798&viewfull=1#post565798
$stmt = $dbConnect->prepare("SELECT * FROM mm_bilder WHERE images_backup != ''"); $stmt->execute(); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); for($i=0;$i<count($rows);$i++) { $oldImages = unserialize($rows[$i]['images_backup']); $newImages = array(); foreach($oldImages AS $k => $v) { /***** Falls noch das ganz alte Verzeichnis tl_files verwendet sein sollte *****/ $v = preg_replace('|tl_|', '', $v); $stmt = $dbConnect->prepare("SELECT uuid FROM tl_files WHERE tl_files.path = ?"); $stmt->execute(array($v)); $row = $stmt->fetchAll(PDO::FETCH_ASSOC); if(isset($row[0]['uuid'])) { $newImages[] = $row[0]['uuid']; } } if(count($newImages) > 0) { $newImages = serialize($newImages); $sqlUpdate = "UPDATE mm_bilder SET images = '".$newImages."' WHERE id = ".$rows[$i]['id']; $stmt = $dbConnect->prepare($sqlUpdate); $stmt->execute(); } }
johannes-bittner
No branches or pull requests
Running this script in a MM2 installation while upgrading from MM 1.x returns errors with the following functions that are removed in MM2:
line 161:
return \MetaModels\Factory::byTableName($nameOrId);
line 190:
$arrMetaModels = \MetaModels\Factory::getAllTables();
Is it possible to fix it? ;-)
The text was updated successfully, but these errors were encountered: