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

Task05380ChangeContainerPathToAbsolute repeating site if container was added several times #24436

Closed
erickgonzalez opened this issue Mar 21, 2023 · 1 comment · Fixed by #24437

Comments

@erickgonzalez
Copy link
Contributor

erickgonzalez commented Mar 21, 2023

Parent Issue

No response

Problem Statement

If the same container is added several times to the template when the UT is run the site is added the number of times the container is found.

Original drawed body:

"containers":[
{"identifier":"/application/containers/body-fixed-width/","uuid":"1"},
{"identifier":"/application/containers/promo-squares/","uuid":"1"},
{"identifier":"/application/containers/promo-squares/","uuid":"2"},
{"identifier":"/application/containers/promo-squares/","uuid":"3"},
{"identifier":"/application/containers/body-fixed-width/","uuid":"2"}
]

Drawed_body after running the UT:

"containers":[
{"identifier":"//demo.dotcms.com//demo.dotcms.com/application/containers/body-fixed-width/","uuid":"1"},
{"identifier":"//demo.dotcms.com//demo.dotcms.com//demo.dotcms.com/application/containers/promo-squares/","uuid":"1"},
{"identifier":"//demo.dotcms.com//demo.dotcms.com//demo.dotcms.com/application/containers/promo-squares/","uuid":"2"},
{"identifier":"//demo.dotcms.com//demo.dotcms.com//demo.dotcms.com/application/containers/promo-squares/","uuid":"3"},
{"identifier":"//demo.dotcms.com//demo.dotcms.com/application/containers/body-fixed-width/","uuid":"2"}
]

Steps to Reproduce

1- Create a Template
2- Update the template via DB, update the drawed_body:

update template set drawed_body = '
{"title": "layout_test","body": {"rows": [{"columns": [{"containers": [{"identifier": "/application/containers/default/","uuid": "1"},{"identifier": "/application/containers/default/","uuid": "2"},{"identifier": "/application/containers/default/","uuid": "3"}],"widthPercent": 83,"leftOffset": 1,"width": 10,"left": 0}]}]}}' where identifier = '{TEMPLATE ID CREATED}';

3- Update the host name old field

update contentlet set text1 = 'demo.dotcms.com' where identifier = '48190c8c-42c4-46af-8d1a-0cd5db894797';

4- Run the UT using the rest API:

POST  http://localhost:8080/api/v1/upgradetask {
    			"upgradeTaskClass":"com.dotmarketing.startup.runonce.Task05380ChangeContainerPathToAbsolute"
			}

Acceptance Criteria

Site must be only added once.

dotCMS Version

21.06 LTS +

Proposed Objective

Customer Success

Proposed Priority

Priority 1 - Show Stopper

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

https://dotcms.zendesk.com/agent/tickets/109923

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

@erickgonzalez erickgonzalez self-assigned this Mar 21, 2023
erickgonzalez added a commit that referenced this issue Mar 21, 2023
@erickgonzalez erickgonzalez linked a pull request Mar 21, 2023 that will close this issue
erickgonzalez added a commit that referenced this issue Mar 22, 2023
@erickgonzalez erickgonzalez added the Release : 22.03.5 Included in LTS patch release 22.03.5 label Mar 22, 2023
erickgonzalez added a commit that referenced this issue Mar 22, 2023
* #24436 set of containers path instead of list, logs

* #24436 test
@erickgonzalez erickgonzalez reopened this Mar 22, 2023
erickgonzalez added a commit that referenced this issue Apr 3, 2023
@AndreyDotcms AndreyDotcms added the Release : 23.01.2 Included in LTS patch release 23.01.2 label Apr 10, 2023
@bryanboza
Copy link
Member

Fixed, tested on release-23.05 // Docker // F F

Tested following the provided steps and now it is working as expected

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

Successfully merging a pull request may close this issue.

3 participants