Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] Tag selection in Category Blog menu item broken #24472

Closed
stutteringp0et opened this issue Apr 4, 2019 · 6 comments
Closed

[4.0] Tag selection in Category Blog menu item broken #24472

stutteringp0et opened this issue Apr 4, 2019 · 6 comments

Comments

@stutteringp0et
Copy link
Contributor

Steps to reproduce the issue

You must have one or more articles with tags

Create a new menu item of type "Category Blog"
Select a category
Attempt to select a tag

Expected result

Can select one or more tags

Actual result

upon clicking a tag, this error occurs in the javascript console:

Uncaught TypeError: e.replace is not a function at t.stripHTML (choices.min.js?3.0.4:4) at Object.addItemText (choices.min.js?3.0.4:2) at e.value (choices.min.js?3.0.4:2) at e.value (choices.min.js?3.0.4:2) at e.value (choices.min.js?3.0.4:2)

System information (as much as possible)

Joomla! 4.0.0-alpha8-dev Development [ Amani ] 9-March-2019 13:41 GMT

Additional comments

@ghost
Copy link

ghost commented Apr 4, 2019

Thanks for your Report. I guess its a duplicate of #23589. I tested your Steps to reproduce and get similaer issues "No results match" on Articles, Menues. So i will change the Title of #23589 and link to this Issue. If this is fine for you, please close this Issue.

@ghost ghost added the J4 Issue label Apr 4, 2019
@stutteringp0et
Copy link
Contributor Author

stutteringp0et commented Apr 4, 2019

I can get results, I just can't click on any of them - I get the JS error
image

@ghost
Copy link

ghost commented Apr 4, 2019

so can you give more Informations like Browser, OS, ...

System information

Setting Value
PHP Built On Linux lamp122.cloudaccess.net 3.10.0-962.3.2.lve1.5.24.7.el6h.x86_64 nr.1 SMP Mon Dec 17 12:02:35 EST 2018 x86_64
Database Type mysql
Database Version 5.7.24-cll-lve
Database Collation utf8_general_ci
Database Connection Collation utf8_general_ci
PHP Version 7.1.26
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Latest Nightly Build Update from Joomla! 4.0.0-alpha8-dev Development [ Amani ] 9-March-2019 13:41 GMT
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:66.0) Gecko/20100101 Firefox/66.0

@stutteringp0et
Copy link
Contributor Author

=============
System Information

php: Linux deathticle 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64
dbserver: mysql
dbversion: 5.5.5-10.2.16-MariaDB-10.2.16+maria~artful
dbcollation: utf8mb4_general_ci
dbconnectioncollation: utf8_general_ci
phpversion: 7.2.15-0ubuntu0.18.04.2
server: nginx/1.14.0
sapi_name: fpm-fcgi
version: Joomla! 4.0.0-alpha8-dev Development [ Amani ] 9-March-2019 13:41 GMT
useragent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/73.0.3683.75 Chrome/73.0.3683.75 Safari/537.36

@ghazal
Copy link
Contributor

ghazal commented Apr 5, 2019

Already discussed in #24211

We are using the script choices.js and its joomla adapted dependant script, joomla-field-fancy-select.js
The error lies in an old version of choices.js.
It's been corrected in an ulterior version, not yet implemented in j4.
But if we use choices.js last version, the joomla adapted dependant script, joomla-field-fancy-select.js is not really functional.
Until this script is corrected, we won't be able to use this functionality.

As is, it's possible to make it work in a fashion, in /media/vendor/choicesjs/js/choices.js (v.3.0.4):
line 5920
replace

var stripHTML = exports.stripHTML = function stripHTML(html) {
	  return html.replace(/&/g, '&amp;').replace(/>/g, '&rt;').replace(/</g, '&lt;').replace(/"/g, '&quot;');
	};

by

var stripHTML = exports.stripHTML = function stripHTML(html) {
	  return String(html).replace(/&/g, '&amp;').replace(/>/g, '&rt;').replace(/</g, '&lt;').replace(/"/g, '&quot;');
	};

But this meddling won't stand future updates.

@stutteringp0et
Copy link
Contributor Author

Fantastic! Thanks for the update, I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants