Actions

J3.x

Difference between revisions of "Missing JBrowser class after upgrading"

From Joomla! Documentation

m (Hutchy68 moved page J3.1:Missing jbrowser class after upgrading to joomla 3.1.4 to J3.1:Missing JBrowser class after upgrading: making generic, as it effects more than 1 maintenance version, notice and categories take care of versions)
(Change from jimport to JLoader::import(). Add 3.1 FAQ and amend notice)
Line 1: Line 1:
{{notice|This issue only affects '''some''' 3rd party extensions in Joomla! versions 3.1.4 and 3.1.5}}
+
{{notice|This issue only affects '''some''' 3rd party extensions in Joomla! versions 3.1.4 and higher}}
  
 
== Tipical error message ==
 
== Tipical error message ==
Line 19: Line 19:
 
To this (with legacy way to load classes)
 
To this (with legacy way to load classes)
 
<source lang="php">
 
<source lang="php">
jimport ('joomla.environment.browser'); // Add this linecode
+
JLoader::import('joomla.environment.browser') // Add this linecode
 
$browser = JBrowser::getInstance();
 
$browser = JBrowser::getInstance();
 
//...
 
//...
Line 26: Line 26:
 
[[Category:Version 3.1.4 FAQ]]
 
[[Category:Version 3.1.4 FAQ]]
 
[[Category:Version 3.1.5 FAQ]]
 
[[Category:Version 3.1.5 FAQ]]
 +
[[Category:Version 3.1 FAQ]]

Revision as of 03:33, 7 August 2013

Info non-talk.png
General Information

This issue only affects some 3rd party extensions in Joomla! versions 3.1.4 and higher

Tipical error message

Fatal error: Class 'JBrowser' not found in path/to/file.php on line XY

Afected versions

After update to Joomla 3.1.4, some some extensions that depend on the native autoloader , with a working code before, may stop working.

Workaround

While this is not resolved, change the source code from something similar to this

$browser = JBrowser::getInstance();
//...

To this (with legacy way to load classes)

JLoader::import('joomla.environment.browser') // Add this linecode
$browser = JBrowser::getInstance();
//...