MODx 3 - Create Document Inside fails to create anything

On MODx 3.0.1 and 3.0.2, I can’t create a new document inside a folder/container. I can duplicate existing documents fine, but the create new doesn’t do anything.

I get the pop-up dialog and can type all the details, choose a template, etc, but when clicking on the save button it shows a progress bar for half a second and then nothing happens. No new document is created and the dialog is still sitting there.

The error log doesn’t show anything related.

I can’t reproduce this.

When you open the developer tools in the browser (tab “Network”) before clicking the “Save” button, is there an AJAX request that fails? Is there maybe an error message in the response of that request?


Do you use a custom plugin that runs when a new resource is created that maybe throws an error?

I don’t see any errors in the browsers dev tools when trying to create a new resource. I don’t know if there is a custom plugin that would interfere with creating a new one.

I do have a lot of things installed like Articles, ContentBlocks, Redactor, MIGx, Tagger, etc that modifies what can be stored in a resource. How would I check if those are interfering with creating a new resource?

NOTE:
I do have this error showing up repetedly in the logs whenever a resource is opened. It doesn’t seem directly related to trying to create one, but maybe whatever is causing that error is also interfering with resource creation (but not with duplication).

[2022-12-14 15:22:43] (ERROR @ /.../core/cache/includes/elements/modx/revolution/modplugin/9.include.cache.php : 38) PHP warning: Undefined array key 1

You could temporarily deactivate the plugins and check if creating a resource works.
If it works, activate the plugins one by one to find out which one breaks the process.


This PHP warning stems from the plugin with the ID = 9. What plugin is this?

This PHP warning stems from the plugin with the ID = 9. What plugin is this?

It seems to be the XPDo Core Services. The error also seems to stop (or is invisible) if I switch from PHP 8.0 to 7.4.

PHP 7.4 doesn’t solve the create new document problem though.

xPDO is not a plugin. The plugin has to be from an installed extra.

It looks like it is a plugin. It shows up under the plugin group.

I’ve never seen this plugin.
How old is this site?
According to this old forum post, this plugin is used for “hacking attacks”!

The site is pretty old. It probably was running on 2.2 sometime in the past.

I disabled that #9 plugin and it appears to have cleared out that error. Still can’t create a new document though.

I doubt this is related, but I also noticed that

  • 3.0 won’t stay logged in.
  • Logout All Users command gives an error “flush_sessions_not_supported”.

Scratch that. I’m moving back to 2.8. Too many bugs in 3.0 still.

That suggests you may not be using the default season handler MODX comes with. Perhaps that’s not compatible and causing your session issues too.

How would one check what session handler is being used?

maybe better try to begin with a clean MODX 3 and add all Extras and stuff step by step manually, if you don’t know what was customized and which customization creates issues with MODX 3.

session_handler system setting.

I see a session_handler_class field which is set to modSessionHandler.

Try changing that to MODX/Revolution/modSessionHandler - that should be getting updated automatically when upgrading from 2 to 3, but apparently wasn’t done on your site.

That didn’t seem help any of the problems.

I tried a new upgrade from 2.8.4 to 3.0.3 and the problem with creating a new page still exists.

I found that in the home dashboard there is a link up top that opens the Create Document page. From that I can create new pages. The feature that always fails is when you click on that little plus in the resource tree and it opens the model pop-over window. That little box never saves anything.

I also tried disabling all plugins. No change.

I finally figured this out by going setting by setting through a test site that wasn’t broken.

If you have Friendly URLs turned on and then have automatic alias generation turned off, the pop-up dialog fails to create a new resource.

Normally in the full page version of the Create Document screen it will prompt you to type an alias. Perhaps since that little pop-up dialog doesn’t include an alias field it is getting rejected somehow.

So this is probably a bug of sorts.