Skip to content

Commit 6d96f21

Browse files
committed
fix: Reload browser after "Create alias..." to ensure frontend data consistency
1 parent 33c5aa5 commit 6d96f21

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

djangocms_alias/templates/djangocms_alias/alias_replace.html

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,7 @@
1414
// we have a special case here cause the CMS namespace
1515
// can be either inside the current window or the parent
1616
(function(Window) {
17-
Window.CMS.$(document).ready(function () {
18-
// make sure we're doing after the "modal" mechanism kicked in
19-
setTimeout(function () {
20-
{% if replaced_placeholder %}
21-
Window.CMS.API.StructureBoard.invalidateState('CLEAR_PLACEHOLDER', {{ replaced_placeholder|safe }});
22-
{% else %}
23-
Window.CMS.API.StructureBoard.invalidateState('DELETE', {{ replaced_plugin|safe }});
24-
{% endif %}
25-
{% for added_plugin, structure in added_plugins %}
26-
var addedPlugin = {{ added_plugin|safe }};
27-
addedPlugin.structure = {{ structure|safe }};
28-
Window.CMS.API.StructureBoard.invalidateState('ADD', addedPlugin);
29-
{% endfor %}
30-
{% for moved_plugin in moved_plugins %}
31-
var moveData = {{ moved_plugin|safe }};
32-
Window.CMS.API.StructureBoard.invalidateState('MOVE', moveData);
33-
{% endfor %}
34-
35-
Window.CMS.API.StructureBoard._requestcontent = null;
36-
Window.CMS.API.StructureBoard.updateContent();
37-
}, 100);
38-
});
17+
Window.CMS.API.Helpers.reloadBrowser();
3918
})(window.parent || window);
4019
</script>
4120
{% endblock %}

0 commit comments

Comments
 (0)