VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Darko F. on October 16, 2022, 19:37:22 PM

Title: Searchable Customfield don't work if Language Constant are used
Post by: Darko F. on October 16, 2022, 19:37:22 PM
J4 with VirtueMart 4.0.7 10720
Php 8.0

Searchable Customfield configured as is described here:

https://docs.virtuemart.net/tutorials/administration-configuration-vm-2/225-searchable-customfield-usecase.html

Don't work Any more IF is Language Constant used in Default value of Custom field

Before somebody ask, I using constants because I have multi language site,

Here is Example of my Default value in Custom Field:

VM_TAG_TX;VM_TAG_LETEV;VM_TAG_A_REZ;TEST

If I Sort by TEST work OK and product with custom field set on TEST is shown up, If I sort by - VM_TAG_TX -  you don't get  any product
Title: Re: Searchable Customfield don't work if Language Constant are used
Post by: Darko F. on October 17, 2022, 11:12:36 AM
I must to add that, all constant have their respective Language override in Joomla.
Title: Re: Searchable Customfield don't work if Language Constant are used
Post by: hazael on October 17, 2022, 11:30:29 AM
Make sure you have added products in a different language
Title: Re: Searchable Customfield don't work if Language Constant are used
Post by: Darko F. on October 17, 2022, 13:58:01 PM
I make double check and product they are in translated
Title: Re: Searchable Customfield don't work if Language Constant are used
Post by: Milbo on October 17, 2022, 19:37:32 PM
It should work, if you use the language tags consequently, anywhere. Do I understand you right, that you used that already and it worked before? So the problem cannot be a misconfiguration.
Title: Re: Searchable Customfield don't work if Language Constant are used
Post by: Darko F. on October 29, 2022, 22:45:17 PM

I find Problem is that when you write in custom field constant u using ____ underline, and for some reason underlain in custom fields don't work as filters, is not mater wich language.
So when you write in custom field constant COM_XX_YY because underlines __ will not work.

Tested with com_virtuemart.4.0.7.10730_package_or_extract.zip J4 and J3
Title: Re: Searchable Customfield don't work if Language Constant are used
Post by: Darko F. on November 01, 2022, 12:16:57 PM
I noticed in J4
com_virtuemart.4.0.7.10730_package_or_extract.zip

you can't any more use let say -  "" S - squire; ""   in custom field list still you can use CONSTANT_SOMETHING

S squire without "" - "" works

I find this strange, and if you use constant filters don't work.
Title: Re: Searchable Customfield don't work if Language Constant are used
Post by: Milbo on November 02, 2022, 11:35:18 AM
The db escape is doing that. I think the reason that it does not work, is strictCustomfieldTags. Just disable it in the new admin template. It was accidently enabled for new installs in the new template.
Title: Re: Searchable Customfield don't work if Language Constant are used
Post by: Darko F. on November 03, 2022, 09:14:14 AM
It's, worked yea :)
Thank you Milbo