Joomla 3.0 DS does not work(Use of undefined constant DS)
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', '/');
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, 2022Comments
-
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?
-
David Fritsch almost 11 yearsYou 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 almost 11 yearsusing the forward slash is OS dependant
-
Elin almost 11 yearsIn 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. over 10 yearsThis is a nice workaround for older components, thank you very much.