8000 Fix Custom Property Sets not working after upgrade to MODX 3 by JoshuaLuckers · Pull Request #16337 · modxcms/revolution · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix Custom Property Sets not working after upgrade to MODX 3 #16337

New issue

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

Merged
merged 1 commit into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

/*
* This file is part of the MODX Revolution package.
*
* Copyright (c) MODX, LLC
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/


/**
* @property modX $modx
*/

use MODX\Revolution\modChunk;
use MODX\Revolution\modElementPropertySet;
use MODX\Revolution\modPlugin;
use MODX\Revolution\modSnippet;
use MODX\Revolution\modTemplate;
use MODX\Revolution\modTemplateVar;

/* modify legacy core class references in modElementPropertySet element_class column */

$class = modElementPropertySet::class;
$table = $modx->getTableName($class);

$elementClass = $this->install->lexicon('alter_column', ['column' => 'element_class', 'table' => $table]);
$this->processResults($class, $elementClass, [$modx->manager, 'alterField'], [$class, 'element_class']);

$modx->updateCollection($class, ['element_class' => modChunk::class], ['element_class' => 'modChunk']);
$modx->updateCollection($class, ['element_class' => modTemplate::class], ['element_class' => 'modTemplate']);
$modx->updateCollection($class, ['element_class' => modTemplateVar::class], ['element_class' => 'modTemplateVar']);
$modx->updateCollection($class, ['element_class' => modPlugin::class], ['element_class' => 'modPlugin']);
$modx->updateCollection($class, ['element_class' => modSnippet::class], ['element_class' => 'modSnippet']);
11 changes: 11 additions & 0 deletions setup/includes/upgrades/mysql/3.0.3-pl.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
/**
* Specific upgrades for Revolution 3.0.3-pl
*
* @var modX $modx
* @package setup
* @subpackage upgrades
*/

/* run upgrades common to all db platforms */
include dirname(__DIR__) . '/common/3.0.3-update-legacy-class-references.php';
0