how to automatically save changes to modx made through the database?

102 Views Asked by At

I added resources via phpmyadmin to the site_content table in database. These resources are displayed in the modx resource tree. But they don’'t have an alias. It appears automatically only after I click the "Save" button in modx Is it possible to automate this process somehow?

1

There are 1 best solutions below

2
Anton Tarasov On

When resource creates via Manager it has proper alias(see alias and uri fields in modx_site_content table) + information in resource tree cache. Ho do you add them, manually? If so I may you suggest the next: add them all firstly via phpmyadmin and then open Manager and run "Regenerate URLs", this will rebuild all other what's necessary for proper addressing.

Alternatively you can add resources via MODX API, but some code will be needed and bulk data input.