Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate Task220825MakeSomeSystemFieldsRemovable but make it better #23736

Closed
wezell opened this issue Jan 4, 2023 · 5 comments · Fixed by #23782, #24057 or #24134
Closed

Duplicate Task220825MakeSomeSystemFieldsRemovable but make it better #23736

wezell opened this issue Jan 4, 2023 · 5 comments · Fixed by #23782, #24057 or #24134

Comments

@wezell
Copy link
Contributor

wezell commented Jan 4, 2023

Proposed Objective

Accessibility (WCAG)

Proposed Priority

Priority 1 - Show Stopper

dotCMS Version

23.01

Problem Statement

In 23.01 we rolled out a change that allows a site builder to remove a bunch of the unnecessary default content type fields found in our base content types - for example, all File Assets used to require a "show on menu" field. We created a startup task to mark these optional fields as "not required" in the db, but the logic of this startup task hard-coded the structure identifiers that it expected to change, meaning that it only works in the latest starter and not on any content types that were added by a customer.

We need to create a new, almost identical startup task Task23XXXXMakeSomeSystemFieldsRemovable that runs the same logic, except this time, change the the requiredness of the fields based on their structures base type, e.g. any content type that is a File Asset should have those fields marked as "not required".

Steps to Reproduce

Add a custom File Asset type to a dotCMS version < 23.01, and check that the optional fields cannot be removed. Then upgrade. All the optional fields should now be removable.

Acceptance Criteria

Add a custom File Asset type to a dotCMS version < 23.01, and check that the optional fields cannot be removed. Then upgrade. All the optional fields should now be removable.

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

No response

Assumptions & Initiation Needs

No response

Sub-Tasks

No response

Estimates

No response

@jcastro-dotcms jcastro-dotcms self-assigned this Jan 10, 2023
jcastro-dotcms added a commit that referenced this issue Jan 11, 2023
…locity Var Names

Duplicate the `Task220825MakeSomeSystemFieldsRemovable` to use Velocity Var Names instead of Inodes, which is how the previous `Task220825MakeSomeSystemFieldsRemovable` did.
@damen-dotcms damen-dotcms changed the title [Defect]: Duplicate Task220825MakeSomeSystemFieldsRemovable but make it better Duplicate Task220825MakeSomeSystemFieldsRemovable but make it better Jan 19, 2023
fmontes pushed a commit that referenced this issue Jan 20, 2023
…better

* #23736: Duplicate `Task220825MakeSomeSystemFieldsRemovable` to use Velocity Var Names

Duplicate the `Task220825MakeSomeSystemFieldsRemovable` to use Velocity Var Names instead of Inodes, which is how the previous `Task220825MakeSomeSystemFieldsRemovable` did.

* Test for reverting the version of the empty starter for unit tests back to the previous one.

* Updating Empty and Full Starters. Updating Base Types instead of specific Content Types.

* Fixing error in Integration Test

* Checking test results with old empty starter data

* Bringing new empty starter back to check test results.

* Using old Empty Starter so that tests run correctly.
@fmontes fmontes reopened this Jan 20, 2023
@jcastro-dotcms
Copy link
Contributor

NOTE FOR IQA AND QA

It's extremely important to make sure that the affected Content Types and their respective fields are updated in both Empty and Full Starters. The list of fields per Base Content Type that must be removable are specified in the description of the following ticket: #15847 (the Widget type didn't require any change)

You can compare the list of removable fields in your test environment with our current Demo Site so that you can see that the trash icon is present now.

Here's the list of Content Types that must be reviewed per Starter:

Empty Starter:

  • Host
  • Persona
  • Page
  • File Asset

Full Starter:

  • Host
  • File
  • Image
  • Page
  • Landing Page
  • Product Line
  • Destination
  • Persona

@fmontes
Copy link
Member

fmontes commented Jan 24, 2023

Update from 22.12 > 23.02_SNAPSHOT

@josemejias07
Copy link

This is block by not been able to build a local environment with 23.02 branch https://gist.github.com/josemejias07/15c699eae011573714e07ab088c9874c

@damen-dotcms damen-dotcms added this to the 2023.02 milestone Feb 1, 2023
@bryanboza
Copy link
Member

We are getting problems when you delete the cache TTL filed from the page asset content type

Image

And we are printing this in the log continuously and it never ends.


testing_pg-dotcms-1         | 18:55:50.383  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.398  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.412  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.428  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.441  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.454  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.470  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.483  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.496  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.508  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.523  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.537  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.551  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.564  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.578  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.592  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.622  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.636  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.651  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.666  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.678  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.689  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.704  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.718  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.731  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.743  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.756  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.772  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.785  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.800  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.813  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.826  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.840  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.853  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.867  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.881  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.933  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:50.975  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:51.036  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:51.055  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:51.152  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:51.172  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:51.205  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:51.217  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:51.232  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:51.247  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:51.261  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:51.273  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:51.286  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:51.300  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:51.315  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]
testing_pg-dotcms-1         | 18:55:51.334  INFO  util.SecurityLogger - class com.dotcms.rest.exception.mapper.DotBadRequestExceptionMapper : null -- ip:172.24.0.1,user:Admin User [ID: dotcms.org.1][email:admin@dotcms.com]

jcastro-dotcms added a commit that referenced this issue Feb 8, 2023
…t better

Return a TTL Cache of zero when the TTL field is not present for a Page content type.
fmontes pushed a commit that referenced this issue Feb 10, 2023
…better

Return a TTL Cache of zero when the TTL field is not present for a Page content type.
@bryanboza
Copy link
Member

Fixed, now this is running and we are able to remove the system fields without problems
https://gist.github.com/bryanboza/067cfd6e7a177aef2af29820eaf88a59

Tested on release-23.02 // Docker // FF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment