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

EZP-23208: async publishing JavaScript polling gives bad results #1048

Merged
merged 5 commits into from Aug 6, 2014

Conversation

5 participants
@dpobel
Copy link
Contributor

commented Jul 30, 2014

JIRA: https://jira.ez.no/browse/EZP-23208

Description

The asynchronous publishing queued page is meant to regularly poll eZ Publish to inform the editor whether a given version is still waiting to be published or not. It does that by doing an AJAX request every second no matter if the server is slow or takes to much time to generate a response. As a result, if the server is a bit slow, the browser will queue a lots of requests which at some point (depending on the browser) blocks others tabs or request to the same server giving the impression to the editor that a content is still waiting to be published while it was actually published several minutes ago.

This patch (actually 664e4b5) makes sure the JavaScript won't generate a new AJAX request if a previous one is still not executed.
In addition, I added the error handling on the AJAX response and try to improve the UI for the editor. See the screencast: https://www.youtube.com/watch?v=JuD5Qrv16_E (this is still ugly but at least it gives a better feedback)

Tasks

  • Fix CS
  • Fix EZP-23208
  • Add a better error handling
  • Give some love to the UI :)

Tests

manual tests by slowing down the AJAX response and opening the same queued page in several tabs.

@dpobel

This comment has been minimized.

Copy link
Contributor Author

commented Jul 31, 2014

Ready to be reviewed

@dpobel dpobel changed the title [WIP] EZP-23208: async publishing JavaScript polling gives bad results EZP-23208: async publishing JavaScript polling gives bad results Jul 31, 2014

@gggeek

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2014

Hand-tested on chrome/win7, trying to publish in parallel 10 versions of the same object in different browser tabs (which reproducibly does not work with mainline code).
Seems to fix the issue. Could do with a slightly nicer UI ;-) but at least there is clear visual feedback.

+1

@andrerom

This comment has been minimized.

Copy link
Member

commented Jul 31, 2014

+1

1 similar comment
@lolautruche

This comment has been minimized.

Copy link
Contributor

commented Aug 1, 2014

+1

yannickroger added a commit that referenced this pull request Aug 6, 2014

Merge pull request #1048 from ezsystems/ezp-23208_async_ui
EZP-23208: async publishing JavaScript polling gives bad results

@yannickroger yannickroger merged commit 132748e into master Aug 6, 2014

1 check failed

continuous-integration/travis-ci The Travis CI build failed
Details

@yannickroger yannickroger deleted the ezp-23208_async_ui branch Aug 6, 2014

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.