Joomla 3.0 DS does not work(Use of undefined constant DS)

32,518

Solution 1

Add the below line

if(!defined('DS')) define('DS', DIRECTORY_SEPARATOR);

From the docs.

The DS constant has been removed. If you really need it you can use DIRECTORY_SEPARATOR instead.

Also there is a plugin to fix this issue.

You can find the full list here.

Potential backward compatibility issues in Joomla 3 and Joomla Platform 12.2

Solution 2

Sometimes you need this: if(!defined('DS')) define('DS', '/');

Share:
32,518
Techie
Author by

Techie

Remembering that I'll be dead soon, is the most important tool I've ever encountered to help me make the big choices in Life. Because almost everything - all external expectations, all pride, all fear of embarrassment or failure, these things just fall away in the face of death, leaving only what is truly important. Remembering that you are going to die, is the best way I know to avoid the trap of thinking you have something to lose. You are already naked, there is no reason not to follow your heart. -- Steve Jobs

Updated on July 24, 2022

Comments

  • Techie
    Techie almost 2 years

    Joomla 3.0 DS does not work. It has been removed. I get

    Notice: Use of undefined constant DS - assumed 'DS' in
    

    How can I fix this?

    Similar Question

    Migrating from Joomla 2.5 to 3x Generating Errors

  • David Fritsch
    David Fritsch almost 11 years
    You can also for the most part just not use DS and instead just put a forward slash in the file path: ajh.us/4
  • Techie
    Techie almost 11 years
    using the forward slash is OS dependant
  • Elin
    Elin almost 11 years
    In 2013 (and well before) forward slash is not a problem on windows except in very specific and limited situations most of which would not occur in normal extensions.
  • Felix G.
    Felix G. over 10 years
    This is a nice workaround for older components, thank you very much.