fbpx

Astroid 2.4 Landed with Joomla 4 Compatibility Download Now

Welcome, Guest
Username: Password: Remember me

TOPIC: Warning: Undefined constant JDB_JOOMLA_VERSION

Warning: Undefined constant JDB_JOOMLA_VERSION 3 weeks 6 days ago #24731

  • Alexey Longh
  • Alexey Longh's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Thank you received: 1
  • Karma: 0
Hi,

I noticed a warning in the Regular Labs Content Templater plugin:

Warning: Use of undefined constant JDB_JOOMLA_VERSION - assumed 'JDB_JOOMLA_VERSION' (this will throw an Error in a future version of PHP) in plugins\system\jdbuilder\jdbuilder.php on line 201

I fixed the constant JDB_JOOMLA_VERSION to 'JDB_JOOMLA_VERSION'.

The warning no longer appears. :)

I also found nine lines in jdbuilder.php where the variable $docuemnt is used instead of $document (IMHO):

        Line 46:          $docuemnt = \JFactory::getDocument();
	Line 47:          $docuemnt->addStyleDeclaration($style);
	Line 199:         $docuemnt = \JFactory::getDocument();
	Line 202:         $docuemnt->addScript(JURI::root() . 'media/system/js/core.js');
	Line 220:         $docuemnt->addStyleDeclaration($style);
	Line 221:         $docuemnt->addStyleSheet('//fonts.googleapis.com/css?family=Noto+Sans:400,700');
	Line 222:         $docuemnt->addStyleSheet(JURI::root(true) . '/media/jdbuilder/css/style.min.css', ['version' => JDB_MEDIA_VERSION]);
	Line 223:          $docuemnt->addStyleSheet(JURI::root(true) . '/media/jdbuilder/css/rtl.css', ['version' => JDB_MEDIA_VERSION]);
	Line 224:          $docuemnt->addStyleSheet(JURI::root(true) . '/media/jdbuilder/js/builder/styles.css', ['version' => JDB_MEDIA_VERSION]);

After changing the name of this variable, the site continues to work :)

Joomla! 3.9.21
Astroid 2.3.0
JD Builder 1.9
PHP 7.3.17
The administrator has disabled public write access.

Warning: Undefined constant JDB_JOOMLA_VERSION 3 weeks 5 days ago #24741

  • hitesh99raj
  • hitesh99raj's Avatar
  • Offline
  • Administrator
  • Posts: 60
  • Thank you received: 20
  • Karma: 4
Hi,
Thanks for the support and update, We will fix these things in our next upcoming release.

Thanks,
Hitesh
The administrator has disabled public write access.
Moderators: chandandeep
Time to create page: 0.261 seconds