[TikiWiki-commits] [Git][tikiwiki/tiki][28.x] [BP][FIX] Prevent execution attempt of element-plus autocomplete and select...

"Merci Jacob \(@mercihabam\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68b7581fe556e_2cdce10290db@gitlab-sidekiq-low-urgency-cpu-bound-v2-6c8b87f786-m98pz.mail>

Merci Jacob pushed to branch 28.x at Tiki Wiki CMS Groupware / Tiki


Commits:
8abb75d5 by Merci Jacob at 2025-09-02T20:41:43+00:00
[BP][FIX] Prevent execution attempt of element-plus autocomplete and select lazyload when the feature is off and clear out console errors
---
* [FIX] Prevent execution attempt of element-plus autocomplete and select lazyload when the feature is off and clear out console errors
---
* [FIX] Prevent execution attempt of element-plus autocomplete and select lazyload when the feature is off and clear out console errors

See merge request tikiwiki/tiki!8383

See merge request tikiwiki/tiki!8477

- - - - -


2 changed files:

- lib/smarty_tiki/FunctionHandler/Autocomplete.php
- src/js/vue-widgets/element-plus-ui/src/components/Select/Select.vue


Changes:

=====================================
lib/smarty_tiki/FunctionHandler/Autocomplete.php
=====================================
@@ -30,7 +30,7 @@ class Autocomplete extends Base
         global $prefs;
         $headerlib = \TikiLib::lib('header');
 
-        if ($prefs['elementplus_autocomplete'] !== 'y' && $prefs['feature_jquery_autocomplete'] !== 'y') {
+        if (($prefs['feature_elementplus'] !== 'y' || $prefs['elementplus_autocomplete'] !== 'y') && $prefs['feature_jquery_autocomplete'] !== 'y') {
             return '';
         }
 


=====================================
src/js/vue-widgets/element-plus-ui/src/components/Select/Select.vue
=====================================
@@ -63,7 +63,7 @@ const remoteMethod = async (query) => {
     const data = await response.json();
     const loadedOptions = data.map(item => (typeof item === "string" ? { value: item, label: item }: item));
     const newOptions = [
-        ...options.value.filter(item => modelValue.value.includes(item.value)),
+        ...options.value.filter(item => modelValue.value?.includes(item.value)),
         ...loadedOptions,
     ];
     options.value = newOptions;



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/8abb75d5e65248c7498c8094ff62092adcc28fa1

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/8abb75d5e65248c7498c8094ff62092adcc28fa1
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.