J3 Issue ?
avatar dioubernardo
dioubernardo
28 Jan 2019

Steps to reproduce the issue

-- crop.php

const _JEXEC = 1;

if (!defined('_JDEFINES')){
    define('JPATH_BASE', dirname(__DIR__));
    require_once JPATH_BASE . '/includes/defines.php';
}

require_once JPATH_LIBRARIES . '/import.legacy.php';
require_once JPATH_LIBRARIES . '/cms.php';
require_once JPATH_CONFIGURATION . '/configuration.php';
require_once JPATH_BASE . '/includes/framework.php';

class CronFURG extends JApplicationCli{

	public function doExecute(){
		...
	}
}

JApplicationCli::getInstance('CronFURG')->execute();
php cron.php

Expected result

No result

Actual result

PHP Warning: Use of undefined constant JDEBUG - assumed 'JDEBUG' (this will throw an Error in a future version of PHP) in /storage/htdocs/joomla/ppgbaac/libraries/src/Version.php on line 327

avatar dioubernardo dioubernardo - open - 28 Jan 2019
avatar joomla-cms-bot joomla-cms-bot - change - 28 Jan 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 Jan 2019
avatar PhilETaylor
PhilETaylor - comment - 28 Jan 2019

Im pretty sure I worked on this before:

#15843

566a79f

avatar PhilETaylor
PhilETaylor - comment - 28 Jan 2019

try

<?php
define('_JEXEC', 1);
define('JPATH_BASE', realpath('../'));
// ini_set('display_errors', '1');
// error_reporting(E_ALL);
// define('JDEBUG', 1);
include_once JPATH_BASE . '/includes/defines.php';
include_once JPATH_BASE . '/includes/framework.php';
include_once JPATH_BASE . '/libraries/joomla/factory.php';

class CronFURG extends JApplicationCli{
  public function doExecute(){
   //	...
  }
}

JApplicationCli::getInstance('CronFURG')->execute();

avatar joomla-cms-bot joomla-cms-bot - change - 6 Feb 2019
Status New Closed
Closed_Date 0000-00-00 00:00:00 2019-02-06 17:02:51
Closed_By joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 6 Feb 2019
avatar Quy Quy - change - 6 Feb 2019
Closed_Date 2019-02-06 17:02:51 2019-02-06 17:02:54
Closed_By joomla-cms-bot Quy
avatar joomla-cms-bot
joomla-cms-bot - comment - 6 Feb 2019

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/23699

avatar N6REJ
N6REJ - comment - 5 Sep 2019

@franz-wohlkoenig REOPEN THIS PLEASE
as of 3.9.11 this is still occurring
image
the "hi" is the jdebug working but it's throwing the warning.

avatar franz-wohlkoenig franz-wohlkoenig - reopen - 5 Sep 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Sep 2019
Status Closed New
Closed_Date 2019-02-06 17:02:54
Closed_By Quy
avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Sep 2019
Labels Added: J3 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 5 Sep 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Sep 2019
Status New Discussion
avatar N6REJ
N6REJ - comment - 5 Sep 2019

This solves the issue which is strange since it thinks there is no jdebug constant.

<jdoc:include type="modules" name="debug" style="none"/>
<!--  If JDEBUG is defined, load the css -->
<?php if (defined('JDEBUG') && JDEBUG)
{
	HTMLHelper::_( 'stylesheet', '/framework/debug.css', $HTMLHelperDebug );
}
?>
avatar mbabker
mbabker - comment - 6 Sep 2019

Constants are case sensitive so your warning is correct because Joomla does not create mixed case constants.

I’m also not quite sure how this qualifies to re-open an issue when both the source path of the error and the way of triggering it have nothing to do with the original report. A similar error message does not equate to the same “bug”.

avatar HLeithner HLeithner - change - 6 Sep 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-09-06 11:06:52
Closed_By HLeithner
avatar HLeithner HLeithner - close - 6 Sep 2019
avatar dioubernardo dioubernardo - change - 6 Sep 2019
The description was changed
avatar dioubernardo dioubernardo - edited - 6 Sep 2019

Add a Comment

Login with GitHub to post a comment