Octopoos / SEBLOD

Build high-end websites with SEBLOD®, a CCK for Joomla!
https://www.seblod.com
GNU General Public License v2.0
129 stars 54 forks source link

Bug in getAbsoluteUrl() for validation / availability #726

Closed Giuse69 closed 1 year ago

Giuse69 commented 1 year ago

Hi, after upgrade from Seblod 3.10 to Seblod 4, the validation / availability, when editing a field, does not work anymore. The problem is that it adds the language tag in the AJAX URL where it shouldn't, for example the AJAX call is to https://<base_domain>/j4/it/administrator/en/index.php?... that throws a 404, instead of the correct that is (and was in Seblod 3): https://<base_domain>/j4/administrator/index.php?... Looking at the code, I saw that the following lines were added in Seblod 4 in the getAbsoluteUrl() function in libraries/cck/_/dev/helper.php (lines 149-151): if ( $lang_sef ) { $context .= $lang_sef.'/'; } Removing them, the problems disappears. Apparently, at least in my configuration, there are no drawbacks, but it seems strange that those 2 lines were added without a purpose. @sebastienheraud what do you think? thanks

Giuse

sebastienheraud commented 1 year ago

Hi @Giuse69, Thanks, one condition added to remove it from the back-end https://github.com/Octopoos/SEBLOD/commit/a307b2e4d0a0bbf37232a02ecd2c80b3443002e3, Included in upcoming 4.1 release Sebastien