modxcms / fred

The friendly front-end editor for visual, drag-and-drop content building in MODX CMS
https://fred.modx.com
MIT License
59 stars 25 forks source link

Fred custom events fail to install on modx 3.0.1-pl #444

Closed Jsewill closed 2 years ago

Jsewill commented 2 years ago

When installing Fred on modx 3.0.1-pl, at least the custom events fail to install. This affects the Fred TinyMCE integration, among other things.

Jsewill commented 2 years ago

I have been working around it by installing them via snippet:

if ($modx) {
    $events = [
        'FredBeforeRender',
        'FredElementFormRender',
        'FredOnBeforeFredResourceSave',
        'FredOnFredResourceSave',
        'FredOnFredResourceLoad',
        'FredOnBeforeGetResourceTree',
        'FredOnElfinderRoots'
    ];
    foreach ($events as $eventName) {
        $event = $modx->getObject('modEvent', ['name' => $eventName]);
        if (!$event) {
            $event = $modx->newObject('modEvent');
            $event->set('name', $eventName);
            $event->set('service', 6);
            $event->set('groupname', 'Fred');
            $event->save();
        }
    }
    return 'Installed events.';
}
return 'Failed to install events.';
lottaar commented 2 years ago

Is this why it's not possible to install the Fred extras (Fred Ace Integration/Fred TinyMCE RTE/Fred Font Awesome 5 Icon Editor) in MODX 3? I thought it was because they weren't made compatible with MODX 3 but maybe that's not the case? Are you saying they can be installed in some other way?

rthrash commented 2 years ago

This issue has been mentioned on MODX Community. There might be relevant details there:

https://community.modx.com/t/modx-3-and-fred-ace-integration-fred-tinymce-rte-fred-font-awesome-5-icon-editor/5805/4

neoneddy commented 2 years ago

@rthrash Nothing new.

Mark-H commented 2 years ago

@neoneddy That's an automatic message sent from the forum.

neoneddy commented 2 years ago

@Mark-H @rthrash Ah, might be good to add some context to the automated message for those of us not in the know. I appreciate everyone's hard work on all of this.