-
Notifications
You must be signed in to change notification settings - Fork 55
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
If an exception is thrown in a tile, @@updatetilecontent gives an error 500 and nothing is shown to the user #581
Comments
sounds fair to me; @rodfersou let's take a quick look on this |
We can add a
statusCode to handle it... but I don't know if there's a better approach. In my opinion, if possible in jquery, a nice thing to do would be a generic handling of all 500 errors.
Since we have @rodfersou and @hvelarde, ideas? |
+1 |
@hvelarde is 1.0a13 towards Plone 5.0? Should I add plone.app.stagingbehavior to packages that depend on collective.cover that will still be installed in 4.3? |
yes, the idea is to fix all compatibility problems, one step at a time, until we get the package running in both versions. |
@idgserpro for me it is fair to add a But there are other places where we need these
And not sure if we need this here:
Need to look with more attention everywhere. For me the error message could be placed in the same place there is the message "Tile content replaced during the blocks transform." and we think about another kind of mask, or style when there is and error. @agnogueira could you please think about the style of the error message? |
Shows message if an exception is thrown (fix #581)
This is difficult to reproduce, since we're using a portuguese tile component in a complex setup that has this behavior, so we'll try to simulate it editing some of collective.cover implementation files to easy the test:
1 - Clone this repository (we tested using commit 6d615de, before 1.0a13 release);
2 -
python bootstrap.py
andbin/buildout
;3 - Create a simple cover and add a simple tile;
4 - Stop Plone;
5 - Edit src/collective/cover/tiles/basic.py and add a bunch of
to all methods (or choose any method that's called in compose view when you select a content to add);
6 - Start Plone again;
7 - You should see:
This is not a helpful message, but at least the cover isn't broken (similar message when you have a broken portlet);
8 - Go to compose;
9 - Try to add a new item to the basic tile that throwns the exception;
10 - You get:
Infinite loading and a 500 Internal Server error, so it's not possible to the user to know if an error occured or if the server is slow. When you click compose again, you see that nothing was saved.
I'm not familiar with this component source code, neither it's javascript implementation, but I think a message should be shown to the user telling an error on the server happened: don't know the best place to show it. Maybe in the place of the loading icon?
The text was updated successfully, but these errors were encountered: