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

Remove references to old core actions #14667

Closed
JoshuaLuckers opened this issue Aug 12, 2019 · 4 comments

Comments

@JoshuaLuckers
Copy link
Collaborator

commented Aug 12, 2019

Bug report

Summary

In MODX 3.x modConfigJsProcessor/ ConfigJs doesn't load actions for backwards compatibility.

This line of code is removed in ConfigJs (the processor responsible to output $modx->config to JSON).

// Load actions for backwards compatibility (DEPRECATED)
$actions = $this->modx->request->getAllActionIDs();
$o .= 'MODx.action = ' . $this->modx->toJSON($actions) . ';';

Step to reproduce

  1. Checkout the 3.x branch with all recent changes.
  2. Drag and drop a resource in the tree
  3. Open the developer console

Observed behavior

An error appears: TypeError: undefined is not an object (evaluating 'MODx.action['resource/update']')

Expected behavior

No error.

Environment

MODX 3

@Mark-H

This comment has been minimized.

Copy link
Collaborator

commented Aug 12, 2019

Considering actions have been deprecated since 2.2 I'm okay with that... though that will cause breakage in extras.

@JoshuaLuckers

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 12, 2019

Considering actions have been deprecated since 2.2 I'm okay with that... though that will cause breakage in extras.

I'm not sure who removed it from the code. We can always reconsider the removal and put it back if to many (unmaintained) extra's break that are being used "heavily".

@JoshuaLuckers

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 12, 2019

Or create a “compatibility mode” extra!

@JoshuaLuckers

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 17, 2019

It has been "agreed" on to add back support for the deprecated actions and remove support in a future versions.

MODX 3.0.0-alpha automation moved this from To do to Done Aug 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.