Steps to reproduce:
- Create a layout, give it a name, select a template.
- Add
about
as the layout path. - Save
Actual behavior
Error: That path is currently assigned to be an alias for "node/2". Delete the alias first, then save this layout.
The "Delete the alias first" bit is a link that leads you to a confirmation form:
We have made this "smart", so we include a destination back to admin/structure/layouts/add
. Still, when the user returns, the form is blank; the layout name, template, and path have not been retained .
Expected behavior
When the user returns to the layout add form, all previously entered data has been retained.
Even more expected behavior
Instead of showing an initial error, then having the user confirm the action, then return them back to the layout add form, we should be redirecting to the confirmation page with a message along the lines of:
That path is currently assigned to be an alias for "node/2". In order to proceed, that alias will be removed and then replaced by this layout.
...once the user responds "yes", we save the layout and provide a success message:
Layout "About" has been created, replacing the path alias for "node/2"
Go above and beyond
We store the node path of the previously removed alias in the layout settings. If the layout is deleted in the future, we check to see if the alias is in use, and we restore it (or at least offer the user the option to). UX+++
Recent comments
Thank you @Meaghan1 - all of those were valid points but I had them correctly set. My remaining issue relates to the path to the downloadable file, being the easily guessable example I...
Ubercart and downloadable file product
Hi Sudipto, this error usually means CiviCRM isn’t initializing properly before a dependent module (like CiviMember Roles Sync) tries to call its functions. After upgrading, verify that the...
Facing an error after upgrading Civicrm version from 5.78.3 to 6.5.0
Hi Martin, it sounds like you’ve set things up correctly, but a couple of common issues might be preventing the file from showing. First, ensure the Ubercart File Downloads module is fully...
Ubercart and downloadable file product