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.086 seconds

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started