Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Notice "Undefined variable: js" 28 Sep 2013 22:53 #11223

  • yves
  • yves's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
My component works fine in the Sandbox 3.0.

After download on a local Joomla 3.1.5 platform, I get this message from JDomHtmlGridTaskTask->buildJs( ) :
"Notice: Undefined variable: js in C:\wamp\www\joomla\administrator\components\com_test\dom\html\grid\task\task.php on line 106"

I downloaded the component with Embed Framework = Yes, same trouble.

Does somebody has any Idea ?
Thanks

Please Log in or Create an account to join the conversation.

Notice "Undefined variable: js" 28 Sep 2013 23:12 #11225

that's just a notice, I usually don't care about notices and warnings. I know I should but I have no time for the "state of the art" coding.

by the way, this fix it, go to that file and add the line /* hack */:
	function buildJs()
	{
		$js = false; /* hack */
The following user(s) said Thank You: yves

Please Log in or Create an account to join the conversation.

Notice "Undefined variable: js" 29 Sep 2013 14:07 #11234

  • yves
  • yves's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
Thanks for showing me the way.

I understand this is due to a different error_reporting setting in the sandbox and my local environment.

Anyway, I fixed the buildJs() function using isset() so that php is happy and notice disappeared, :
if (isset($js))
	$this->addScriptInline($js, false, null);
instead of :
if ($js)
	$this->addScriptInline($js, false, null);

Please Log in or Create an account to join the conversation.

Last edit: by yves.

Notice "Undefined variable: js" 29 Sep 2013 14:35 #11235

  • yves
  • yves's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
Also had to fix another notice of missing property on dom\html\form\input\select\radio.php (to show publication icons) in buildRadio.
I commented 3 lines, but I"m not sure this is the right fix :
//if (!$viewType = $this->viewType)
//{
	if (isset($item->$viewKey))
		$viewType = $item->$viewKey;
	else
		$viewType = 'both';	
//}

Please Log in or Create an account to join the conversation.

Notice "Undefined variable: js" 29 Sep 2013 23:42 #11244

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Both fixed.
Coding is now a piece of cake
The following user(s) said Thank You: yves

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.092 seconds
  I still don't believe he can really be human to do all this ! From all of the forums that I've ever participated in this is certainly the one that most encapsulates the feeling of being truly open source where everyone's opinions and contributions can and will shape the development of the service! It's truly awesome! Hope you enjoy cooking and look forward to reading and contributing to any of the editorial work that you proposed too!! Thanks
Gez (audibleid - JED)

Get Started