[TikiWiki-commits] [Git][tikiwiki/tiki][29.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 | <68b755bcf2c3e_2cdcf005068e@gitlab-sidekiq-low-urgency-cpu-bound-v2-6c8b87f786-n2wvs.mail> |
Merci Jacob pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki
Commits:
72f7034d by Merci Jacob at 2025-09-02T20:30:25+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!8476
- - - - -
3 changed files:
- lib/smarty_tiki/FunctionHandler/Autocomplete.php
- lib/smarty_tiki/FunctionHandler/UserSelector.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') {
+ if ($prefs['feature_elementplus'] != 'y' || $prefs['elementplus_autocomplete'] !== 'y') {
return '';
}
=====================================
lib/smarty_tiki/FunctionHandler/UserSelector.php
=====================================
@@ -113,7 +113,7 @@ class UserSelector extends Base
$userCount = $userlib->count_users('');
}
- if ($lazyload || ($prefs['elementplus_select'] == 'y' && ($userCount > $prefs['user_selector_threshold'] || $userCount > $params['user_selector_threshold']))) {
+ if ($lazyload || ($prefs['feature_elementplus'] == 'y' && $prefs['elementplus_select'] == 'y' && ($userCount > $prefs['user_selector_threshold'] || $userCount > $params['user_selector_threshold']))) {
$urlParams = [
'listonly' => $params['realnames'] === 'y' ? 'userrealnames' : 'users',
];
=====================================
src/js/vue-widgets/element-plus-ui/src/components/Select/Select.vue
=====================================
@@ -65,7 +65,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/72f7034da7f5013f0655ada8a08a6877da4090df
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/72f7034da7f5013f0655ada8a08a6877da4090df
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