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

2

7

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

Kelsy answered 29/8, 2013 at 5:35 Comment(0)
K
26

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

Kelsy answered 29/8, 2013 at 5:35 Comment(4)
You can also for the most part just not use DS and instead just put a forward slash in the file path: ajh.us/4Ainu
using the forward slash is OS dependantKelsy
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.Dougherty
This is a nice workaround for older components, thank you very much.Eurhythmy
H
2

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

Hardspun answered 6/8, 2015 at 15:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.