PHP-DS-001

DS

DS path constant

DS was a Joomla shortcut for the directory separator. It was removed in Joomla 4. PHP already has DIRECTORY_SEPARATOR. Forward slashes work on Windows in PHP.

DSDIRECTORY_SEPARATOR or /

Dies at Joomla 3 → 4J3: Works nativelyJ4: Removed — fatalJ6: Removed — fatalBC plugin: no — already dead on J4Mechanical renamePHP

What you will see

  • Undefined constant DS
  • Use of undefined constant DS

Symptoms people search

helper path broken · failed to open stream after upgrade

Replace this code

Swap DS for DIRECTORY_SEPARATOR or /.

Joomla 3

Remove or stop calling this

$path = JPATH_COMPONENT . DS . 'helpers' . DS . 'foo.php';

Joomla 4 / 6

Use this instead

$path = JPATH_COMPONENT . '/helpers/foo.php';

How to fix it

  1. 1Replace DS with '/' inside Joomla paths.
  2. 2Or use DIRECTORY_SEPARATOR if you concatenate OS paths.

Also known as

DS · directory separator

Related issues

Get in touch

Have a project in mind? Let's talk about it.

Tell us what you're building. Whether it's a new site, an online store, a mobile app, or something that needs AI under the hood, we'll get back to you within a business day.

Free consultation
No commitment, no pressure
Reply within 24 hours
Usually much faster

Prefer a direct conversation?

Request a project quote

Tell us about your project

Fill out the quick form and we'll reach out.