When a project config application restores a previously-deleted navigation, there is an incorrect table name in a query that throws and error and does not restore the previous nodes.
That nodes table alias is not present in the query, so the WHERE condition fails currently.
Steps to reproduce
Create a navigation & commit the project config changes that are generated
Switch to a different branch and run ./craft project-config/apply, which will remove that navigation as the config files are no longer present
Switch back to the original branch and again run ./craft project-config/apply. The plugin will attempt to recreate the deleted nav, but will fail due to a DB query error: Column not found: 1054 Unknown column 'nodes.deletedWithNav' in 'where clause'
Describe the bug
When a project config application restores a previously-deleted navigation, there is an incorrect table name in a query that throws and error and does not restore the previous nodes.
On line 384 of services/Navs.php, I believe
should instead be:
That
nodes
table alias is not present in the query, so the WHERE condition fails currently.Steps to reproduce
./craft project-config/apply
, which will remove that navigation as the config files are no longer present./craft project-config/apply
. The plugin will attempt to recreate the deleted nav, but will fail due to a DB query error:Column not found: 1054 Unknown column 'nodes.deletedWithNav' in 'where clause'
Craft CMS version
4.5.0
Plugin version
2.0.20
Multi-site?
Yes
Additional context
No response