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

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started