Skip to content
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

Cronjob-Klassen vor 5.1.0 aktualisieren #116

Closed
alxndr-w opened this issue Sep 13, 2024 · 1 comment · Fixed by #119
Closed

Cronjob-Klassen vor 5.1.0 aktualisieren #116

alxndr-w opened this issue Sep 13, 2024 · 1 comment · Fixed by #119
Assignees
Labels
bug Something isn't working

Comments

@alxndr-w
Copy link
Member

Description / Beschreibung
Durch #93 ändern sich die Klassen. Bereits installierte Klassen funktionieren dann nicht mehr und müssen nachträglich noch per SQL geändert werden:

image

z.B.
alt: rex_cronjob_neues_publish.type = "rex_cronjob_neues_publish"
neu: rex_cronjob_neues_publish.type = "FriendsOfRedaxo\Neues\Cronjob\Publish"

@alxndr-w alxndr-w added the bug Something isn't working label Sep 13, 2024
@alxndr-w alxndr-w added this to the 5.1.0 Autoren-Automatik milestone Sep 13, 2024
@christophboecker
Copy link
Member

Jaaaaa, ist im Code enthalten, nur leider mit dem klassischen Fehler: es wird auf die alte Klasse zugegriffen. Merge; ich hätte es wissen müssen. Korrigiere ich morgen in Ruhe.

neues/install.php

Lines 63 to 78 in 3203c18

if (rex_addon::get('cronjob')->isAvailable()) {
/**
* ggf Update von früheren Versionen mit dem alten Klassennamen
* -> rex_cronjob_neues_publish ändern in FriendsOfRedaxo\Neues\Cronjob\Publish.
*/
$sql->setTable(rex::getTable('cronjob'));
$sql->setValue('type', Publish::class);
$sql->setWhere('`type` = :class', [':class' => 'rex_cronjob_neues_publish']);
$sql->update();
/**
* Fehlenden CronJob eintragen.
*/
$sql->setTable(rex::getTable('cronjob'));
$sql->setWhere('`type` = :class', [':class' => Publish::class]);
$sql->select();

Statt Publish::class hätte es 'FriendsOfRedaxo\\Neues\\Cronjob\\Publish' sein müssen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants