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

Javascript error on Zero Content Container #16329

Closed
dsolistorres opened this issue Apr 2, 2019 · 3 comments

Comments

@dsolistorres
Copy link
Contributor

commented Apr 2, 2019

Reported via Support: Ticket 97807
Reproducible in dotCMS 5.0.3, dotCMS 5.1.1

Zero Content Container causes a javascript error when editing a page.

Steps to reproduce the behavior:

  1. Create a new Zero Content Container with some VTL code, for example:
#set ($myVar1 = "my Value")
<div>
    $myVar1
</div>
  1. Create a new template with the "Add Template Designer" option.
  2. Add the container created in the step 1 to the new template.
  3. Create a new page with the template created in the step 2.
  4. Go to edit the page, and click on the 'Edit' tab to go to Edit mode.
  5. An error shows in javascript console. This the error stack trace:
src-app-portlets-dot-edit-page-content-dot-edit-content-module-ngfactory.ba40b2eb92897e063daf.js:1 TypeError: Cannot read property 'style' of null
    at src-app-portlets-dot-edit-page-content-dot-edit-content-module-ngfactory.ba40b2eb92897e063daf.js:1
    at Array.map (<anonymous>)
    at src-app-portlets-dot-edit-page-content-dot-edit-content-module-ngfactory.ba40b2eb92897e063daf.js:1
    at Array.map (<anonymous>)
    at e.getContainerDomElements (src-app-portlets-dot-edit-page-content-dot-edit-content-module-ngfactory.ba40b2eb92897e063daf.js:1)
    at e.setContaintersSameHeight (src-app-portlets-dot-edit-page-content-dot-edit-content-module-ngfactory.ba40b2eb92897e063daf.js:1)
    at m.debounce.leading (src-app-portlets-dot-edit-page-content-dot-edit-content-module-ngfactory.ba40b2eb92897e063daf.js:1)
    at m (vendor.0ffb5565afa74a45008e.js:1)
    at vendor.0ffb5565afa74a45008e.js:1
    at b (vendor.0ffb5565afa74a45008e.js:1)
(anonymous) @ src-app-portlets-dot-edit-page-content-dot-edit-content-module-ngfactory.ba40b2eb92897e063daf.js:1
src-app-portlets-dot-edit-page-content-dot-edit-content-module-ngfactory.ba40b2eb92897e063daf.js:1 TypeError: Cannot read property 'offsetHeight' of null
    at src-app-portlets-dot-edit-page-content-dot-edit-content-module-ngfactory.ba40b2eb92897e063daf.js:1
    at Array.map (<anonymous>)
    at src-app-portlets-dot-edit-page-content-dot-edit-content-module-ngfactory.ba40b2eb92897e063daf.js:1
    at Array.map (<anonymous>)
    at e.getContainerDomElements (src-app-portlets-dot-edit-page-content-dot-edit-content-module-ngfactory.ba40b2eb92897e063daf.js:1)
    at e.setContaintersSameHeight (src-app-portlets-dot-edit-page-content-dot-edit-content-module-ngfactory.ba40b2eb92897e063daf.js:1)
    at m.debounce.leading (src-app-portlets-dot-edit-page-content-dot-edit-content-module-ngfactory.ba40b2eb92897e063daf.js:1)
    at m (vendor.0ffb5565afa74a45008e.js:1)
    at vendor.0ffb5565afa74a45008e.js:1
    at b (vendor.0ffb5565afa74a45008e.js:1)
e.setContaintersSameHeight @ src-app-portlets-dot-edit-page-content-dot-edit-content-module-ngfactory.ba40b2eb92897e063daf.js:1

Expected behavior

Zero Content Container shouldn't cause javascript errors when editing a page.

Screenshots

Zero Content Container:
container

Template including Zero Content Container:
template

Additional context

This has been reported by customer via Support: Ticket 97807
The issue is causing problems for a client working with Designer Templates including Zero Content Container in dotCMS 5.0.3

@wezell wezell added this to the Fox Current milestone Apr 3, 2019

@dsolistorres dsolistorres added this to R&D Said will add to Current/Next Iteration in Enterprise Services Issues Apr 3, 2019

@hmoreras

This comment has been minimized.

Copy link
Contributor

commented Apr 4, 2019

can't reproduce this error, on master (head 9f64c32).

@fmontes

This comment has been minimized.

Copy link
Member

commented Apr 22, 2019

Can't reproduce, please @bryanboza let us know if you can.

@bryanboza bryanboza added this to REX in QA Apr 22, 2019

@bryanboza

This comment has been minimized.

Copy link
Contributor

commented Apr 22, 2019

Unable to reproduce with those steps... Tested on master // Postgres // FF

@bryanboza bryanboza moved this from REX to Done in QA Apr 22, 2019

@fmontes fmontes closed this Apr 29, 2019

Enterprise Services Issues automation moved this from R&D Said will add to Current/Next Iteration to Done Apr 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.