Closed sottwell closed 4 months ago
I checked the database, and the modx_fred_element_template_access really isn't there after the first, create, save. It is there after the second, update, save.
I see that all of the other Fred create and update processors where templates are assigned have an afterSave function that deals with the templates, but the element's create processor does not. I rather imagine this is why the templates field is not saved on first creating a new element.
This issue has been mentioned on MODX Community. There might be relevant details there:
https://community.modx.com/t/element-templates-drop-down-not-saving/3581/1
Um... that's my link to this issue.
I found the "relevant details" in the core/components/fred/processors/mgr/elements/create.class.php, it's missing the afterSave function.
The Element Templates drop-down does not save the selected value on first save. The page refreshes after saving the Element, and the drop-down is empty. Select the Template again, and this time it saves it when the Element is saved again.
I'm not sure what exactly happens if an Element is used without a template being selected, but in any case that's not the expected behavior of a select drop-down.