core
core copied to clipboard
Missing Nav items when upgrading
Several customers had experience nav issues when upgrading to 22.03 LTS, some items aren't showing.
I took a deep look at this and it's a DB issue, looks like in previous versions of dotcms we didn't update the field show_on_menu
in the table contentlet we only update the field contentlet where the show on menu field is referencing (e.g text6).
To fix this I've run the following queries:
--gets the content types that have a field named showOnMenu and the field_contentlet
select structure_inode,field_contentlet from field where velocity_var_name = 'showOnMenu';
--to know how many contentlets are gonna be updated, change field_contentlet and structure_inode accordingly
select count(*) from contentlet where show_on_menu = false and text3 = 'true' and structure_inode = 'd5ea385d-32ee-4f35-8172-d37f58d9cd7a';
--update show_on_menu column, change field_contentlet and structure_inode accordingly
update contentlet set show_on_menu = true where show_on_menu = false and text6 = 'true' and structure_inode = 'c541abb1-69b3-4bc5-8430-5e09e5239cc8';
To request a customer DB that experienced this reach support.
Acceptance Criteria
- Run an upgrade task for the queries ang bring the
show on menu
value (this on both data bases)
Hey team! Please add your planning poker estimate with Zenhub @jdotcms @jcastro-dotcms @rjvelazco @hmoreras
After Testing the update from 5.3.8.14 to 22.10, got an error dotSecretsStore
, once that solved, the upgrade task ran successfully but didn't updated the database correctly.
Also did the test running the endpoint http://localhost:8080/api/v1/upgradetask with :
{ "upgradeTaskClass":"com.dotmarketing.startup.runonce.Task220912UpdateCorrectShowOnMenuProperty"}
, but updated just one of two rows.
Fixed, now we are keeping the "show on menu" property after upgrade.
Tested upgrading from 5.3.8 // Release-22.10
Only Applies to 22.03 LTS