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

Can not create in rest a new diff lang version #26861

Closed
jdotcms opened this issue Nov 30, 2023 · 3 comments · Fixed by #26862 or #27346
Closed

Can not create in rest a new diff lang version #26861

jdotcms opened this issue Nov 30, 2023 · 3 comments · Fixed by #26862 or #27346
Assignees
Labels
LTS: Excluded Ticket that has been excluded from at least one LTS QA : Approved Release : 23.10.24 v3 Included in LTS patch release 23.10.24 v3 Release : 24.01.26 Bug Fixing Team : Lunik Type : Defect

Comments

@jdotcms
Copy link
Contributor

jdotcms commented Nov 30, 2023

Parent Issue

No response

Problem Statement

can not create a new language content

Steps to Reproduce

first do

curl --location --request PUT 'http://localhost:8080/api/v1/workflow/actions/default/fire/PUBLISH' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW5AZG90Y21zLmNvbTphZG1pbg==' \
--header 'Cookie: dmid=4a4ab580-0e23-453a-bb27-9e58afe5af02; sitevisitscookie=1' \
--data '{
    "contentlet":{
        "contentType":"webPageContent",
        "title":"Test4",
        "contentHost":"demo.dotcms.com",
        "body":"Test body"
    }
}'

Copy the identifier and run

curl --location --request PUT 'http://localhost:8080/api/v1/workflow/actions/default/fire/PUBLISH' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW5AZG90Y21zLmNvbTphZG1pbg==' \
--header 'Cookie: dmid=4a4ab580-0e23-453a-bb27-9e58afe5af02; sitevisitscookie=1' \
--data '{
    "contentlet":{
        "identifier":"9fb6764c091805ccbac0e21006ce6bef",
        "languageId":2,
        "contentType":"webPageContent",
        "title":"Test4",
        "contentHost":"demo.dotcms.com",
        "body":"Cuerpo de prueba"
    }
}'

Currently fails

Acceptance Criteria

not errors when ran the last curl

dotCMS Version

master

Proposed Objective

Core Features

Proposed Priority

Priority 3 - Average

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

No response

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

jdotcms added a commit that referenced this issue Dec 1, 2023
@jdotcms jdotcms self-assigned this Dec 1, 2023
@jdotcms jdotcms linked a pull request Dec 1, 2023 that will close this issue
jdotcms added a commit that referenced this issue Dec 6, 2023
fmontes added a commit that referenced this issue Dec 7, 2023
* #26861 now support a fire with diff lang

* #26861 adding wait for to the postman test to avoid failures

* #26861 fixing the postman test

---------

Co-authored-by: Freddy Montes <751424+fmontes@users.noreply.github.com>
@erickgonzalez erickgonzalez reopened this Dec 8, 2023
@erickgonzalez erickgonzalez added the LTS : Next Ticket that will be added to LTS label Dec 8, 2023
@fmontes fmontes removed the Triage label Dec 12, 2023
@bryanboza
Copy link
Member

We need some work in the postman test here:

  • First of all when you are creating the English version we are not sending the langId, we take english b/c is the default language, but as a good practice we need to specify the language
{
    "contentlet":{
        "contentType":"webPageContent",
        "title":"TestEnglishSpanish",
        "contentHost":"demo.dotcms.com",
        "body":"Body Test"
    }
}
  • In the tests, we are just validating for a 200 code, we need to include a validation to the value languageId equal to 1 to make sure we created the piece of content in english.
    image

Here the extra validation needed:

pm.test("Lang code ", function () {
    pm.expect(jsonData.entity.languageId).to.eql(1)
});
  • In the last test we named this as CreateSpanish and we are creating an Italian version of the content, this with the provided. Also we need to add the same validation that in the previous comment using the env variable {{italianLanguageId}}

@jdotcms
Copy link
Contributor Author

jdotcms commented Jan 16, 2024

PR for the feedback
https://github.com/dotCMS/core/pull/27346/files

jdotcms added a commit that referenced this issue Jan 17, 2024
@erickgonzalez erickgonzalez added the LTS: Excluded Ticket that has been excluded from at least one LTS label Jan 17, 2024
@fmontes fmontes linked a pull request Jan 17, 2024 that will close this issue
github-merge-queue bot pushed a commit that referenced this issue Jan 17, 2024
* #26861 adding the QA feedback

* Delete dotCMS/src/curl-test/Workflow_test_with_Lang_test.json

Wrong file

* #26861 adding the QA feedback
@bryanboza
Copy link
Member

Fixed, tested on master // postman

erickgonzalez added a commit that referenced this issue Jan 26, 2024
@erickgonzalez erickgonzalez added Release : 23.10.24 v3 Included in LTS patch release 23.10.24 v3 and removed Next LTS Release labels Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS: Excluded Ticket that has been excluded from at least one LTS QA : Approved Release : 23.10.24 v3 Included in LTS patch release 23.10.24 v3 Release : 24.01.26 Bug Fixing Team : Lunik Type : Defect
Projects
Archived in project
5 participants