PHP-JPATH-PLATFORM-001
JPATH_PLATFORM
JPATH_PLATFORM
JPATH_PLATFORM pointed at the old libraries tree. That layout is gone.
JPATH_PLATFORM → Do not use — autoload instead
What you will see
- Undefined constant JPATH_PLATFORM
Symptoms people search
library path fatal
Replace this code
Swap JPATH_PLATFORM for Do not use — autoload instead.
Joomla 3
Remove or stop calling this
require JPATH_PLATFORM . '/joomla/foo.php';Joomla 4 / 6
Use this instead
use the namespaced class. Do not require files out of libraries/src.How to fix it
- 1Remove requires that use JPATH_PLATFORM.
- 2Use a use statement for the CMS class.
Also known as
JPATH_PLATFORM
Related issues
- Joomla 3 → 4PHP
jimport() autoloader calls
jimport('joomla.filesystem.file') → use Joomla\CMS\Filesystem\File;
- Joomla 3 → 4PHP
DS path constant
DS → DIRECTORY_SEPARATOR or /
- Joomla 3 → 4Templates
Protostar site template
Protostar → Cassiopeia (or a Joomla 4+ template), preferably a child template
- Joomla 3 → 4PHP
mysql_* PHP functions
mysql_query() → Joomla DatabaseInterface / mysqli / PDO
- Joomla 3 → 4PHP
each() / create_function() / ereg / split
each($array) → foreach / closures / preg_*
- Joomla 4 → 5PHP
Dynamic PHP properties (PHP 8.2+)
$this->foo = 1 on an untyped class → Declare the property or use AllowDynamicProperties