Chat with us, powered by LiveChat
Home  /  Blog  /  News  /  [SOLVED]: Notice: Use of undefined constant DS – assumed ‘DS’ in

[SOLVED]: Notice: Use of undefined constant DS – assumed ‘DS’ in

The DS constant has been removed in Joomla 3. If you really need it you can use DIRECTORY_SEPARATOR instead or insert the below code in your php file.

<?php
/* BEGIN: Define DS */
JLoader::import( "joomla.version" );
$version = new JVersion();
if (!version_compare( $version->RELEASE, "2.5", "<=")):
   if (!defined("DS")):
      define("DS", DIRECTORY_SEPARATOR);
   endif;
endif;
/* END: Define DS */
?>

Also there is a joomla plugin, named “DS Constant Plugin”, to fix this issue.

Leave a Reply

Your email address will not be published. Required fields are marked *

We are a young team of professionals and internet lovers who specialise in the development of professional websites and premium plugins for WordPress and Joomla! CMS.
Copyright © 2019 Web357. All Rights Reserved.
Joomla! ® name is used under a limited license from Open Source Matters in the United States and other countries.
Web357 is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.