J4 Issue ?
avatar stutteringp0et
stutteringp0et
4 Apr 2019

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

avatar stutteringp0et stutteringp0et - open - 4 Apr 2019
avatar joomla-cms-bot joomla-cms-bot - change - 4 Apr 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Apr 2019
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 4 Apr 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.

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Status New Information Required
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Category com_tags
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 4 Apr 2019
avatar stutteringp0et
stutteringp0et - comment - 4 Apr 2019

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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 4 Apr 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
avatar stutteringp0et
stutteringp0et - comment - 4 Apr 2019

=============
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

avatar ghazal
ghazal - comment - 5 Apr 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.

avatar stutteringp0et stutteringp0et - change - 5 Apr 2019
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2019-04-05 15:24:44
Closed_By stutteringp0et
avatar stutteringp0et
stutteringp0et - comment - 5 Apr 2019

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

avatar stutteringp0et stutteringp0et - close - 5 Apr 2019

Add a Comment

Login with GitHub to post a comment