failing to add a moduled menu - fatal error

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
yabelson
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Apr 26, 2009 4:49 pm

failing to add a moduled menu - fatal error

Post by yabelson » Sun Feb 10, 2013 8:09 am

hi.
i am trying to add a new menu (of the module Fields Attach).
i'm gettign a fatal error now when trying to add the menu item. :eek:
the following error is thrown :

Code: Select all

Notice: Undefined property: JDocumentError::$params in C:\xampp\htdocs\RM_SITE\administrator\templates\isis\error.php on line 114

Fatal error: Call to a member function get() on a non-object in C:\xampp\htdocs\RM_SITE\administrator\templates\isis\error.php on line 114


the code itself is as follows :

Code: Select all

if ($this->params->get('headerColor')) 
	{
	?>
	<s-tyle type="text/css">
		.header
		{
			background: <?php echo $this->params->get('headerColor');?>;
		}
	</style>
	<?php
	}


i tried removing the $this and pointing directly to the $params ( PHP is not my strong point :-[ ).
when i do this, i'm getting an SQL error for not getting the a.id.

...help? :'(

 
User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 26798
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: failing to add a moduled menu - fatal error

Post by Per Yngve Berg » Sun Feb 10, 2013 11:21 am

The problem is that the parameter 'headerColor' is missing.

Put in a var_dump($this->params) in the code an see what $this->params contains.

Try to use another Administrator template and see if it helps.

yabelson
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Apr 26, 2009 4:49 pm

Re: failing to add a moduled menu - fatal error

Post by yabelson » Sun Feb 10, 2013 11:28 am

Per Yngve Berg wrote:The problem is that the parameter 'headerColor' is missing.

Put in a var_dump($this->params) in the code an see what $this->params contains.

Try to use another Administrator template and see if it helps.
PHP is not my strong side...
can you please elaborate where i can add the var_dump, and how i can see it?
also, what can i do in the case that headerColor is missing?

i need to add that other menu items (basic) were added without any issues.

10x

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 26798
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: failing to add a moduled menu - fatal error

Post by Per Yngve Berg » Sun Feb 10, 2013 11:54 am

Code: Select all

if ($this->params->get('headerColor')) 
   {
var_dump($this->params);
   ?>
It's a parameter for the template. Look for it in Template Manager.

yabelson
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Apr 26, 2009 4:49 pm

Re: failing to add a moduled menu - fatal error

Post by yabelson » Sun Feb 10, 2013 12:05 pm

ok ,i added it, and got the same error as metiong above.
do i need to restart the server? or logging out and back in to the admin should suffice to load the file?

maybe i should activate the Debugging of the site? (its a local host. i can do it and later delete the files).

yabelson
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Apr 26, 2009 4:49 pm

Re: failing to add a moduled menu - fatal error

Post by yabelson » Sun Feb 10, 2013 12:24 pm

ok, trying with another template causes another problem - it doesnt give Fatal, but i can't complete the assignement (probably for the same reason).
trying other menus work fine.
so its probably something not with the template but only with the specific module.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 26798
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: failing to add a moduled menu - fatal error

Post by Per Yngve Berg » Sun Feb 10, 2013 12:58 pm

Are you running 3.0.3?

It's probably an issue with the menu itself and not the module.
Can you delete the menu and recreate it?

Use phpmyadmin and check the database. The parameters are a JSON encoded structure in the parameters field of the #__Menu table. Looks like the structure is completly missing for that menu.

yabelson
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Apr 26, 2009 4:49 pm

Re: failing to add a moduled menu - fatal error

Post by yabelson » Sun Feb 10, 2013 3:47 pm

yes, i'm using 3.0.3.
i didnt create the menu, as the actual creation trial is causing the error, so eventually no manu is created...
should i try removing the module and reinstalling it?
if indeed there's an issue with the structure - is this something i can fix myself, or with your assistance? (i'm quite profficient in DBs, so opinting where i should take the structure and data from could assist a lot).

the module itself is from this vendor : http://www.fieldsattach.com/index.php

yabelson
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Apr 26, 2009 4:49 pm

Re: failing to add a moduled menu - fatal error

Post by yabelson » Thu Feb 14, 2013 3:27 pm

found the resolution.
it appears there was indeed a problem with the template.
a patch can be found here
http://joomlacode.org/gf/project/joomla ... m_id=29487

 

Locked

Return to “Extensions for Joomla! 3.x”