core icon indicating copy to clipboard operation
core copied to clipboard

Missing Nav items when upgrading

Open erickgonzalez opened this issue 2 years ago • 1 comments

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

  1. Run an upgrade task for the queries ang bring the show on menu value (this on both data bases)

erickgonzalez avatar Aug 19 '22 17:08 erickgonzalez

Hey team! Please add your planning poker estimate with Zenhub @jdotcms @jcastro-dotcms @rjvelazco @hmoreras

fmontes avatar Sep 09 '22 16:09 fmontes

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.

hmoreras avatar Sep 27 '22 19:09 hmoreras

Fixed, now we are keeping the "show on menu" property after upgrade.

Tested upgrading from 5.3.8 // Release-22.10

bryanboza avatar Sep 30 '22 17:09 bryanboza

Only Applies to 22.03 LTS

erickgonzalez avatar Oct 26 '22 22:10 erickgonzalez