J3 Issue ?
avatar jlainezs
jlainezs
21 Sep 2018

Steps to reproduce the issue

  • In a component code do call \Joomla\Filter\OutputFilter::stringUrlSafe($someText)

Expected result

  • Get the url safe version of text passed to the function.

Actual result

  • The response to the call is a Class 'Joomla\Language\Language' not found error

System information (as much as possible)

  • Joomla! 3.8.12 Stable [ Amani ] 28-August-2018 14:00 GMT
  • English, Catalan and Spanish languages installed
  • Multilanguage content disabled (not working on multilanguage yet)
  • PHP 7.1.20
  • Ubuntu Trusty 64 in a Vagrant box over Virtual Box. BTW, the folder where the site live is shared with a Windows 10 system.

Additional comments

The Language class is defined in the namespace \Joomla\CMS\Language instead of \Joomla\Language\Language as it is written in the OutputFilter class. However, changing the use of line 11 in this class into Joola\CMS\Language\Language raises the runtime error Too few arguments to function Joomla\CMS\Language\Language::getInstance(), 0 passed in /var/www/html/libraries/vendor/joomla/filter/src/OutputFilter.php on line 100 and at least 1 expected

avatar jlainezs jlainezs - open - 21 Sep 2018
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Sep 2018
avatar brianteeman brianteeman - change - 21 Sep 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 21 Sep 2018
avatar mbabker
mbabker - comment - 21 Sep 2018

You should be using the Joomla\CMS\Filter\OutputFilter class, not the Joomla\Filter\OutputFilter class.

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Sep 2018
Status New Information Required
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Sep 2018

@jlainezs if the Comment above solve the Issue please close it, thanks.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22316.

avatar jlainezs
jlainezs - comment - 22 Sep 2018

Change to used class to the one suggested solved the issue.
Thanks!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22316.

avatar jlainezs jlainezs - change - 22 Sep 2018
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2018-09-22 19:10:04
Closed_By jlainezs
avatar jlainezs jlainezs - close - 22 Sep 2018

Add a Comment

Login with GitHub to post a comment