alchemy_cms 7.4.12 → 7.4.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1ae4fb256e37c47ac4c8b4c07355a96e51063cf95da20cfb6f7a4dea8656f53
4
- data.tar.gz: ad01584281aa3668cedaa30a826ec81a8d2df6abadf07d678d06870c0a08193e
3
+ metadata.gz: 077c54f0dbbd27c0de4c42ba39eb7c3aa79309c6dfff2f22db2c4dbbd6c4ba77
4
+ data.tar.gz: 3e07a946b0692a2b93e9d175fe33c1933604228c60f541d753e37849eab452b1
5
5
  SHA512:
6
- metadata.gz: f963091d40b340a546c88362172a2cfaa95376a9a02322dfda7c67517db30aa2ba175ce186ea34a32e50a5a9e196c87674f9308cd5e95430527fc7d7c2525500
7
- data.tar.gz: 757c13ea1763565039c49f16a6084181113dda9ae8392d66e6e8b9dda14afc1549d72eb8918d905b82221902b782858b7ad51a98040cda888e96200d812593f4
6
+ metadata.gz: bfaaa49962d68073188b6d2a384babc691e087d7ba5554f0362809f273ac61a72ee6ca9b3aad8e14551847f7a046ef6328def9e506aaee909e3a910f0a9aebfa
7
+ data.tar.gz: 0acfea518110808170b2d3d3d01ec03f0e1eddf7ff52a5ab3331572471b0618087e84dafb66f0393bb43e6c15f54f549b1a312f0bdb26ff9002d5d72fcbeb543
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.4.14 (2026-03-26)
4
+
5
+ ## What's Changed
6
+ * [7.4-stable] Fix exception in admin when current language is deleted by @alchemycms-bot[bot] in https://github.com/AlchemyCMS/alchemy_cms/pull/3791
7
+
8
+
9
+ **Full Changelog**: https://github.com/AlchemyCMS/alchemy_cms/compare/v7.4.13...v7.4.14
10
+
11
+ ## 7.4.13 (2026-02-17)
12
+
13
+ ## What's Changed
14
+ * [7.4-stable] fix(LinkDialog): Fix anchor regex to handle hyphens in URL fragments by @alchemycms-bot[bot] in https://github.com/AlchemyCMS/alchemy_cms/pull/3684
15
+
16
+
17
+ **Full Changelog**: https://github.com/AlchemyCMS/alchemy_cms/compare/v7.4.12...v7.4.13
18
+
3
19
  ## 7.4.12 (2026-01-19)
4
20
 
5
21
  ## What's Changed
@@ -103,7 +103,7 @@ module Alchemy
103
103
  action_controller = url.gsub(/\A\//, "").split("/")
104
104
  [
105
105
  action_controller.last.to_sym,
106
- action_controller[0..action_controller.length - 2].join("_").to_sym
106
+ action_controller[0..-2].join("_").to_sym
107
107
  ]
108
108
  end
109
109
  end
@@ -30,6 +30,9 @@ module Alchemy
30
30
 
31
31
  def destroy
32
32
  if @language.destroy
33
+ if session[:alchemy_language_id] == @language.id
34
+ session.delete(:alchemy_language_id)
35
+ end
33
36
  flash[:notice] = Alchemy.t("Language successfully removed")
34
37
  else
35
38
  flash[:warning] = @language.errors.full_messages.to_sentence
@@ -1,6 +1,11 @@
1
1
  import { translate } from "alchemy_admin/i18n"
2
2
  import { Dialog } from "alchemy_admin/dialog"
3
3
 
4
+ // Matches a URL fragment (#anchor) at the end of a string.
5
+ // Covers RFC 3986 unreserved characters (ALPHA, DIGIT, "-", ".", "_", "~")
6
+ // which are the characters valid in URL fragments and common in DOM element IDs.
7
+ const ANCHOR_REGEX = /#[\w.~-]+$/
8
+
4
9
  // Represents the link Dialog that appears, if a user clicks the link buttons
5
10
  // in TinyMCE or on an Ingredient that has links enabled (e.g. Picture)
6
11
  //
@@ -103,7 +108,7 @@ export class LinkDialog extends Dialog {
103
108
 
104
109
  if (linkType === "internal" && elementAnchor.value !== "") {
105
110
  // remove possible fragments on the url and attach the fragment (which contains the #)
106
- url = url.replace(/#\w+$/, "") + elementAnchor.value
111
+ url = url.replace(ANCHOR_REGEX, "") + elementAnchor.value
107
112
  } else if (linkType === "external" && !url.match(Alchemy.link_url_regexp)) {
108
113
  // show validation error and prevent link creation
109
114
  this.#showValidationError()
@@ -13,6 +13,7 @@ module Alchemy::Language::Code
13
13
 
14
14
  module ClassMethods
15
15
  def find_by_code(code)
16
+ return unless code.respond_to?(:split)
16
17
  codes = code.split("-")
17
18
  codes << "" if codes.length == 1
18
19
  on_current_site.find_by(
@@ -80,7 +80,8 @@ module Alchemy
80
80
 
81
81
  def load_alchemy_language_from_id_or_code(id_or_code)
82
82
  Language.find_by(id: id_or_code) ||
83
- Language.find_by_code(id_or_code)
83
+ Language.find_by_code(id_or_code) ||
84
+ Language.default
84
85
  end
85
86
 
86
87
  # Stores language in +Current.language+
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "7.4.12"
4
+ VERSION = "7.4.14"
5
5
 
6
6
  def self.version
7
7
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.4.12
4
+ version: 7.4.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
@@ -1409,7 +1409,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1409
1409
  version: '0'
1410
1410
  requirements:
1411
1411
  - ImageMagick (libmagick), v6.6 or greater.
1412
- rubygems_version: 4.0.3
1412
+ rubygems_version: 4.0.6
1413
1413
  specification_version: 4
1414
1414
  summary: A powerful, userfriendly and flexible CMS for Rails
1415
1415
  test_files: []