WOOF Products Filter is returning 0 (zero) products when filtering based on an ACE SELECT field.
WOOF Product Filter Settings:
Field Label: Material
Field Name: material
Search View: Dropdown
Search Options: 100% Cotton (Apparel),100% Polyester?(Apparel),Blend (Apparel),Moisture Wicking (Apparel),Ceramic (Drinkware),Glass (Drinkare),Plastic (Drinkware),Stainless Steel (Drinkware)
Search Type: string
ACE Field Group:
Field Label: Material
Field Name: material
Type: Select
Choices:
—
100% Cotton (Apparel)
100% Polyester (Apparel)
Blend (Apparel)
Moisture Wicking (Apparel)
Ceramic (Drinkware)
Glass (Drinkare)
Plastic (Drinkware)
Stainless Steel (Drinkware)
Select Multiple Values: Yes
Return Format: Value
Looking in the database, the meta_key material has meta_value like this:
EXAMPLE 1: a:1:{i:0;s:26:”Moisture Wicking (Apparel)”;}
EXAMPLE 2: a:2:{i:0;s:25:”100% Polyester?(Apparel)”;i:1;s:26:”Moisture Wicking (Apparel)”;}
I notice that there is a UI interface / sidebar to modify options for the Ace editor, but there is no way to save those as a default, nor could I set the defaults for each new editor that opens in a config file…
I’ve created and tested code in my local that allows this to be set, using JSON files to configure the default configuration options for each Ace Editor instance that Filester creates…
There is likely a better way, so i welcome feedback, but here is my working code, so far:
At line 970 in:
/plugins/filester/includes/File_manager/lib/js/extras/editors.default.js
After this existing code:
editor.setOptions({
theme: 'ace/theme/monokai',
fontSize: '14px',
wrap: true,
});
…add this chunk here:
// load a custom config JSON file if it exists
var request = new XMLHttpRequest();
request.open("GET", "/.ace_config_default.json", false);
request.send(null)
if (request.responseText.indexOf("{") === 0) {
// console.log('editor options', Object.keys(editor.$options));
editor.setOptions(JSON.parse(request.responseText));
}
Then, create a new file in your web root, named: .ace_config_default.json
– then, after Fliester loads a file in the Ace Editor, the settings in the json file will set the options for the new editor instance.
See options here: listed in this doc here
Then, if you want to set a configuration for each separate file mode…
In the same file, further down, after this code chunk here:
editor.setOptions({
enableBasicAutocompletion: true,
enableSnippets: true,
enableLiveAutocompletion: false
});
Add this next chunk:
// load a custom config JSON file for the current mode
var request = new XMLHttpRequest();
request.open("GET", "/.ace_config_" + editor.getOption('mode').substring(editor.getOption('mode').lastIndexOf('/') + 1) + ".json", false);
request.send(null)
if (request.responseText.indexOf("{") === 0) {
// console.log(editor.getOption('mode') + ' options', Object.keys(editor.$options));
editor.setOptions(JSON.parse(request.responseText));
}
Once that is in place, you can create JSON files in the web root to configure the settings for the editor, for each of the different file types, for example:
– .ace_config_default.json // for all editors
– .ace_config_scss.json
– .ace_config_php.json
– .ace_config_javascript.json
etc…
Here is a sample of the contents of my default configuration JSON file:
{
"fontSize": "11px",
"wrap": true,
"highlightActiveLine": true,
"highlightSelectedWord": true,
"showPrintMargin": false,
"scrollPastEnd": "0.5",
"cursorStyle": "wide",
"keyboardHandler": "ace/keyboard/vscode",
"enableMultiselect": true,
"enableBlockSelect": true
}
How do I properly submit a pull request to have this considered for core, please?
I don’t use SVN yet, but if I have to learn I can. I couldn’t find the codebase on Github…
Sidenote : When will the WP team finally move to Git. **~sigh~** SVN is soooo….1990’s
]]>If I had to pick a negative if any… I would like it to integrate more with Elementor Widgets such as using ShopEngine filters with Elementor product grids.
Otherwise well done. Amazing job done here!
]]>Is there a way to save those changes, or at least close that panel?
Can I go into a file in the ACE library you supply and make a manual change?
I also do not see any way to get CodeMirror to do autocomplete. I know there must be some capability, just like the way WP Plugin Editor does autocomplete.
BTW, a great plugin so far
Thanks,
Jamie
File not found:
/wp-content/plugins/css-javascript-toolbox/framework/js/ace/worker-html.js
I can’t find this file in the repository neither. Plugin seems to work fine.
Thanks
Alex.
We are running WP 4.8.1 on PHP7.0 .
We did a scan of this plugin using PHP Compatibility Checker, and found some possible incompatibilities, shown below.
We have supplied these to you in case there is a problem.
If these are a problem, and you know that this plugin is fully compatible with PHP7, then it would be helpful to add this plugin’s name to the PHP compatibility whitelist.
]]>Name: AceIDE
FILE: /home/WebSiteName/public_html/wp-content/plugins/aceide/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php
——————————————————————————————————————-
FOUND 1 ERROR AFFECTING 1 LINE
——————————————————————————————————————-
182 | ERROR | Global with variable variables is not allowed since PHP 7.0
——————————————————————————————————————-FILE: /home/WebSiteName/public_html/wp-content/plugins/aceide/vendor/phpseclib/phpseclib/phpseclib/File/X509.php
————————————————————————————————————-
FOUND 4 ERRORS AFFECTING 4 LINES
————————————————————————————————————-
4387 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4
4412 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4
4479 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4
4551 | ERROR | Using a call-time pass-by-reference is deprecated since PHP 5.3 and prohibited since PHP 5.4
————————————————————————————————————-
Uncaught TypeError: Cannot read property 'ace/ace' of undefined
at s (ace.js:1)
at r (ace.js:1)
at Object.i [as require] (ace.js:1)
at ace.js:3
at ace.js:10
Because of that, I cannot change the font size, type, and stuff during page creation.
Please help.
]]>