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

BlockList: Cannot read properties of undefined (reading 'variants') #15996

Open
rpteasolutions opened this issue Apr 5, 2024 · 2 comments
Open
Labels

Comments

@rpteasolutions
Copy link

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

10.8.5

Bug summary

This was also tested on 13.2.2.

Sometimes when trying to submit changes to a BlockList item it throws an error clicking the button. If you cancel and discard your changes, open up the item again, make your changes and submit it, you are allowed to this time.

The error:
angular.js:15697 TypeError: Cannot read properties of undefined (reading 'variants')
at mapElementValues (umbraco.services.min.js?d=638479086250000000:1:154281)
at blockObject.retrieveValuesFrom (umbraco.services.min.js?d=638479086250000000:1:164536)
at Object.submit (umbraco.directives.min.js?d=638479086250000000:1:576152)
at vm.submitAndClose (umbraco.controllers.min.js?d=638479086250000000:1:184676)
at fn (eval at compile (angular.js:16548:15), :4:170)
at d. [as action] (angular.js:11517:22)
at UmbButtonController.clickButton (umbraco.directives.min.js?d=638479086250000000:1:47809)
at fn (eval at compile (angular.js:16548:15), :4:245)
at e (angular.js:29123:13)
at b.$eval (angular.js:19523:16)

Specifics

Tested in Firefox and Chrome using throttling, seeing the same behaviour.

Steps to reproduce

  1. Create an Element type with a Textstring
  2. Create a BlockList datatype with your element as a block
  3. Create a Docment type with the BlockList as a property, allow the Document type as root too
  4. Create a node of the Document type
  5. Create an item on the property
  6. Save and publish the node
  7. Open dev tools and set throttling in the network tab to something slow enough for the next steps
  8. Click Save and publish
  9. Before the success message is shown, click on the existing item
  10. Wait for the success message to appear
  11. Click Submit
  12. Error will be shown in the Console tab
    Repeating step 8-11 should reproduce the problem every time.

Expected result / actual result

Expected result: Being able to submit the new changes or not being able to open the item until the Save and publish action is done.
Actual result: Javascript error. See bug summary.

Copy link

github-actions bot commented Apr 5, 2024

Hi there @rpteasolutions!

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 🤖 🙂

@andr317c
Copy link
Contributor

Hey!
Thanks a lot for reporting this issue and providing clear reproduction steps🤩. I was able to reproduce this on versions 10.8.5, 13.2.2. The issue also occurs if you are using a Block Grid Editor. I will go ahead and mark this issue as a sprint candidate!

@andr317c andr317c added state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks state/reproduced area/frontend affected/v10 affected/v13 labels Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants