django-cms / djangocms-versioning

General purpose versioning package for Django CMS 4 and above.
Other
33 stars 29 forks source link

Publishing a page shows form instead of reloading new content #402

Closed jrief closed 2 months ago

jrief commented 2 months ago

There seems to be a regression in the sources making up django-cms/cms/static/cms/js/dist/4.1.0/bundle.toolbar.min.js. This bug is not visible yet to users installing django-cms from PyPI, but it will be as soon as we rebundle the JavaScript files.

How to reproduce:

By copying the latest bundled file from https://github.com/django-cms/django-cms/blob/develop-4/cms/static/cms/js/dist/4.1.0/bundle.toolbar.min.js to its local destination at django-cms/cms/static/cms/js/dist/4.1.0/bundle.toolbar.min.js this workflow works again as expected.

Conclusion:

fsbraun commented 2 months ago

@jrief That's an extremely interesting bug:

There are two issues here:

  1. The toolbar officially can load JS ~and therefore preserve JS events if possible. This would be possible by going back to DIffDOM~
  2. The toolbar offers post requests for menu entries, but not for buttons. This is a missing functionality, since all things changing the database should use post requests.

~The fix IMHO should address both issues.~

I have reconsidered this. The updated toolbar can add new buttons (or other elements) which means that the officially loaded toolbar JS must not add their own events to toolbar elements. Let us keep DiffDOM out of the toolbar update.

jrief commented 2 months ago

I can test this on 2024-04-26. Thanks for the quick fix.

fsbraun commented 2 months ago

Yeah, the fix is not there yet ... I'll try.

fsbraun commented 2 months ago

@jrief I have built a first 4.1.1 release for testing including assets. You can test if this bug is sovled by installing git+https://github.com/django-cms/django-cms@release/build

jrief commented 2 months ago

From a functional point of view, this now works. However, the structure tree now is located on the left hand side of the window. This of course is very disturbing.

fsbraun commented 2 months ago

Oh, I see. Seems to be a faulty change in the RTL support.

jrief commented 2 months ago

here is a screenshot:

Screenshot 2024-04-26 at 11 31 30
fsbraun commented 2 months ago

The structure board position should be fixed in the now updated build at git+https://github.com/django-cms/django-cms@release/build.

fsbraun commented 2 months ago

Closed with 4.1.1