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

Error when creating content with Richtext editor property for an other culture #17847

Closed
RickFrontis opened this issue Dec 19, 2024 · 6 comments

Comments

@RickFrontis
Copy link

RickFrontis commented Dec 19, 2024

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

13.5.2

Bug summary

When creating content with a Rich Text Editor property, the content is successfully created for the default culture. However, when attempting to create content for a new culture, I encounter an error upon clicking "Save and Publish" for the new culture.
The problem arises consistently whenever I try to create content for a new culture that has not been created as default. So far I have notice this problem only arise when the document is using an Richtext editor property. Also when I have a look at the files where the error is comming from inside the devtools of my browser, it is pointing to an specific 'fire' action of the tinyMceEditor.

Specifics

No response

Steps to reproduce

Steps to Reproduce

  1. Log in to the Umbraco backoffice.
  2. Navigate to Settings -> Document Types and create a new document type.
  3. Go to the Permissions tab of the newly created document type and enable both "Allow vary by culture" and "Allow as root" options.
  4. Add a Rich Text Editor property to the document type and enable the "Allow vary by culture" option for this property.
  5. In the Settings section, navigate to Languages.
  6. Add multiple languages to your Umbraco instance. In my case, I used the following languages:
    • English (ISO code: en) (default language)
    • Chinese (ISO code: zh)
    • Dutch (ISO code: nl)
    • French (ISO code: fr)
    • German (ISO code: de)
    • Japanese (ISO code: ja)
    • Korean (ISO code: ko)
  7. Navigate to Content and create a new content item in the default language (English, en), leaving the Rich Text Editor property empty.
    • Note: Everything works fine so far.
  8. In the top-right corner, click on the culture dropdown (next to the content title).
  9. Click the plus icon next to "Chinese" to create content for that culture.
    image
  10. Fill in a random title and leave the Rich Text Editor property empty.
  11. Click the Save and publish button.
  12. Observe that the "Ready to publish?" pop-up appears. Click Save and publish again.
  13. After a few seconds, notice that a cross icon appears on the Save and publish button.
    • Open the browser's developer tools and check the Console tab to see the error.

image
image

Expected result / actual result

Expected Behavior: The content should be created and published successfully for the new culture without errors.

Actual Behavior: An error occurs when trying to "Save and Publish" content for a new culture.

Copy link

Hi there @RickFrontis!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

  • We'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
  • If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
  • We'll replicate the issue to ensure that the problem is as described.
  • We'll decide whether the behavior is an issue or if the behavior is intended.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@NguyenThuyLan
Copy link
Contributor

Thank @RickFrontis for the very clear steps for reproducing. I was able to reproduce it on v13.6.0-rc

@RickFrontis
Copy link
Author

Hi @NguyenThuyLan ,

Thank you for your response and for confirming the bug!

I was wondering if you could provide any indication of the timeline for fixing this issue. While working on a project for a customer, I encountered this bug, which has unfortunately prevented me from making further progress.

As you can imagine, it would be very helpful to have an idea of the next steps and whether this issue is likely to be resolved in the coming weeks or months. This would allow me to set the right expectations for my customer.

Thank you in advance for your time and assistance!

@arthurnassar
Copy link

I just had the same issue. Just an addition to that. I was able to find out some things.

The issue looks to be related to the action of changing the culture. If you open a node and click save and publish everything works fine. After you change the culture vm.tinyMceEditor is set to null.

Upon inspection on the source tab I can see that this is the default state of vm.tinyMceEditor
image

By adding some breakpoints I was able to see that when changing the culture there is a detroy handler on the vm $scope that is turning the vm.tinyMceEditor to null
image

I can also see that whenever the page is reloaded (after changing culture) this second part $vm.onInit is called which tries to reassign the editor value to vm.tinyMceEditor
image

By adding a breakpoint on the line that assigns a value to tinyMceEditor i can see that editor indeed has value
{D2674846-F57F-454F-B2AC-50910995A085}

It also has value on the first onServerValueChanged
{F35DF2B8-EE9B-4F75-8B4F-709A1187CC02}

But after this first one the second time it comes here it's already null (that's at least on my test case not sure if it's the same on all)

Btw this was happening at angular.module("umbraco").component("umbRtePropertyEditor",...

@Migaroez
Copy link
Contributor

Fixed in #17987

@RickFrontis this is going into rc2 of 13.6 that will be released tomorrow and the final release will happen on January 30th.

@RickFrontis
Copy link
Author

@Migaroez Thank you for your response, resolving the issue, and providing a timeline! Much appreciated :)

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

No branches or pull requests

5 participants