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

Velocity errors in the container should not break the render of the page #15640

Closed
jgambarios opened this issue Dec 3, 2018 · 9 comments

Comments

@jgambarios
Copy link
Contributor

commented Dec 3, 2018

We need to make sure that when we have velocity parsing issues in our container code the page is able to render and when a parsing velocity error occurs and we are in edit mode an error event should be fired in order to be capture by a component error on the client in order to allow the user to know that the problem is.

@jgambarios jgambarios added this to the Cody Current milestone Dec 3, 2018

@jgambarios jgambarios changed the title Velocity errors in the container should not break render of the page Velocity errors in the container should not break the render of the page Dec 3, 2018

jdotcms added a commit that referenced this issue Dec 11, 2018

jdotcms added a commit that referenced this issue Dec 11, 2018

jdotcms added a commit that referenced this issue Dec 13, 2018

jdotcms added a commit that referenced this issue Dec 13, 2018

jdotcms added a commit that referenced this issue Dec 13, 2018

jgambarios added a commit that referenced this issue Dec 17, 2018

#15640 adding the messages to report errors on parsing velocity on th… (
#15692)

* #15640 adding the messages to report errors on parsing velocity on the edit mode

* #15640 adding some doc

* #15640 new changes for the error handling

* #15640 fixes to identified the edit mode

* #15640 removing noise log
@jgambarios

This comment has been minimized.

Copy link
Contributor Author

commented Dec 17, 2018

PR: #15692

@wezell

This comment has been minimized.

Copy link
Contributor

commented Jan 8, 2019

Needed for edit and preview modes

  • Templates
  • Pages
  • Containers
  • dotParse
  • Widgets
  • Content
@jdotcms

This comment has been minimized.

Copy link
Contributor

commented Jan 11, 2019

now works on both: edit and preview

dsilvam added a commit that referenced this issue Jan 11, 2019

Issue 15732 create graphql types for specific type fields (#15827)
* #15640 adding the messages to report errors on parsing velocity on the edit mode

* #15640 adding some doc

* #14659 some transformer work for Fabrizio to look at

* #15732 more mods

* #15732 Checkbox, MultiSelect, KeyValue, Metadata for Files

* #15732 TagFieldDataFetcher, SiteOrFolder type

* #15732 codacy feedback

jdotcms added a commit that referenced this issue Jan 14, 2019

jdotcms added a commit that referenced this issue Jan 14, 2019

jdotcms added a commit that referenced this issue Jan 14, 2019

jdotcms added a commit that referenced this issue Jan 15, 2019

jdotcms added a commit that referenced this issue Jan 16, 2019

@jgambarios

This comment has been minimized.

Copy link
Contributor Author

commented Jan 17, 2019

PR: #15837

jgambarios added a commit that referenced this issue Jan 17, 2019

Issue 15640 velocity error msg handler 2 (#15837)
* #15640 error handling for editmode

* #15640 avoiding to show an error message when the socket has already reported it
@bryanboza

This comment has been minimized.

Copy link
Contributor

commented Jan 17, 2019

When you are in edit page and cause an error in a simple widget, and close the edit content modal, we are refreshing the content, but not receiving a WS event in order to show the toast notification until you refresh the page, we need add this notification on this resource
/api/v1/containers/56bd55ea-b04b-480d-9e37-5d6f9217dcc3/content/a8e8f9a4-a6ae-404c-9f08-b9bae7a2b857
You can try this causing an error with this widget:

$estool.search({
    'query' : {
        'match_all' : {}
    },
    'size':  10
}");

jdotcms added a commit that referenced this issue Jan 22, 2019

jdotcms added a commit that referenced this issue Jan 23, 2019

@jgambarios

This comment has been minimized.

Copy link
Contributor Author

commented Jan 23, 2019

PR: #15860

jgambarios added a commit that referenced this issue Jan 23, 2019

#15640 fixing the get container resource to handle the error socket (#…
…15860)

* #15640 fixing the get container resource to handle the error socket

* #15640 refactoring to move the PrincipalThreadLocal to the web resource

@fabrizzio-dotCMS fabrizzio-dotCMS self-assigned this Jan 30, 2019

@fabrizzio-dotCMS

This comment has been minimized.

Copy link
Contributor

commented Feb 1, 2019

This might seem like a nitpick but I noticed that the exact same error message appears twice for the same content instance.
In most situations, it renders just once. As it should. But if I create a container then I introduce a broken vtl code like :

#set( $a = "Velocity") #set( $b = 1234) #set( $c = @) #set( $foo = "Velocity") Hello $foo World!<br> #set($r = $math.div($c, 10)) The result is.. $r <br> Good bye $foo World!<br>

Then I Create a template using the template designer. Include the container with the broken code.
Theme: Landing Page
And finally, I create a Page-asset that makes use of the Template I just created.

In this scenario, I get the error message multiple time when I visualize the page on Edit-Mode

jdotcms added a commit that referenced this issue Feb 22, 2019

jdotcms added a commit that referenced this issue Feb 22, 2019

jdotcms added a commit that referenced this issue Feb 22, 2019

jdotcms added a commit that referenced this issue Feb 22, 2019

jdotcms added a commit that referenced this issue Feb 25, 2019

jdotcms added a commit that referenced this issue Feb 25, 2019

jdotcms added a commit that referenced this issue Feb 26, 2019

@jgambarios

This comment has been minimized.

Copy link
Contributor Author

commented Feb 26, 2019

PR: #16100

jgambarios added a commit that referenced this issue Feb 26, 2019

Issue 15640 avoid duplicated messages (#16100)
* #15974 when not exists template, quiet error handling

* #15974 fixing the design templates when container does not exists, also fixing the edit mode and sending a message by using websocket when the container does not exists

* #15974 minor change

* #15640 avoid to send repeat messages to the client

* #15640 avoid a NPE error

* #15640 new strategy for handling repeated messages

* #15640 adding fixes and unit test

* #15640 adding fixes and unit test

* #codacy feedback

@bryanboza bryanboza added this to CODY in QA Feb 27, 2019

@bryanboza

This comment has been minimized.

Copy link
Contributor

commented Feb 28, 2019

Fixed, now we continue rendering the page without problems

@bryanboza bryanboza moved this from CODY to Done in QA Feb 28, 2019

@wezell wezell closed this Mar 4, 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.