8000 Fixed a bug due to incorrect localization in toolbar JS · django-cms/django-cms@f596692 · GitHub
[go: up one dir, main page]

Skip to content

Commit f596692

Browse files
committed
Fixed a bug due to incorrect localization in toolbar JS
1 parent 17fc98d commit f596692

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.txt

Lines changed: 2 additions & 0 deletions
B2B2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
=== 3.5.1 (unreleased) ===
22

3+
* Fixed a bug where editing pages with primary keys greater than 9999 would throw an
4+
exception.
35
* Fixed a ``MultipleObjectsReturned`` exception raised on the page types migration
46
with multiple page types per site.
57
* Fixed a bug which prevented toolbar js from working correctly when rendered

cms/templates/cms/toolbar/toolbar_javascript.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
'request': {
1919
'language': '{{ cms_toolbar.language }}',
2020
'model': '{{ cms_toolbar.get_object_model }}',
21-
'page_id': '{% if request.current_page.publisher_is_draft %}{{ request.current_page.pk }}{% else %}{{ request.current_page.publisher_public_id }}{% endif %}',
22-
'pk': '{{ cms_toolbar.get_object_pk }}',
21+
'page_id': '{% if request.current_page.publisher_is_draft %}{{ request.current_page.pk|unlocalize }}{% else %}{{ request.current_page.publisher_public_id|unlocalize }}{% endif %}',
22+
'pk': '{{ cms_toolbar.get_object_pk|unlocalize }}',
2323
'url': '{% language cms_toolbar.language %}{% cms_admin_url "cms_page_resolve" %}{% endlanguage %}',
2424
'toolbar': '{% language cms_toolbar.language %}{% cms_admin_url "cms_usersettings_get_toolbar" %}{% endlanguage %}'
2525
},

0 commit comments

Comments
 (0)
0