# JoomlaWorks Community Forum

Welcome to the JoomlaWorks Community Forum | If you have a question, please search before posting!

### AuthorTopic: Undefined variable: defaultImagePath   (Read 4447 times)

#### goempie

• Newbie
• Posts: 3
##### Undefined variable: defaultImagePath
« on: July 06, 2013, 06:43:21 pm »
When using the SIG I receive following error: "Undefined variable: defaultImagePath in C:\wamp\www\site\plugins\content\jw_sig\jw_sig.php on line 129"
My images are in the std. directory "stories"; changing directory in plugin doesn't do anything.
What did I forgot?

Thanks!
Signatures appear only for members with more than 30 posts

#### RenzJW

• Newbie
• Posts: 4
##### Re: Undefined variable: defaultImagePath
« Reply #1 on: July 08, 2013, 12:56:18 am »
Gonna post the same question. Looks like I don't need to anymore.
Same error:
Notice: Undefined variable: defaultImagePath in C:\xampp\htdocs\imagetry\plugins\content\jw_sig\jw_sig.php on line 129
Signatures appear only for members with more than 30 posts

#### Katia

• JoomlaWorks Support Team
• Hero Member
• Posts: 8274
• Ni Dios Ni Amo
##### Re: Undefined variable: defaultImagePath
« Reply #2 on: July 08, 2013, 02:31:47 pm »
Where do you get this message?
IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

#### goempie

• Newbie
• Posts: 3
##### Re: Undefined variable: defaultImagePath
« Reply #3 on: July 08, 2013, 05:38:04 pm »
I'm getting the error when the page with the SIG has loaded.
Full display of the error:

( ! ) Notice: Undefined variable: defaultImagePath in C:\wamp\www\Sitename\plugins\content\jw_sig\jw_sig.php on line 129
Call Stack
#   Time   Memory   Function   Location
1   0.0010   689944   {main}( )   ..\index.php:0
2   0.2123   10573080   JSite->dispatch( )   ..\index.php:52
3   0.2130   10608112   JComponentHelper::renderComponent( )   ..\application.php:221
4   0.2290   10611000   JComponentHelper::executeComponent( )   ..\helper.php:339
5   0.2979   10687128   require_once( 'C:\wamp\www\Sitename\components\com_k2\k2.php' )   ..\helper.php:359
6   0.4261   11650216   JControllerLegacy->execute( )   ..\k2.php:62
7   0.4261   11650296   K2ControllerItem->display( )   ..\legacy.php:722
8   0.5823   13160648   K2Controller->display( )   ..\item.php:73
9   0.5823   13160856   JControllerLegacy->display( )   ..\controller.php:20
10   0.6610   14094016   K2ViewItem->display( )   ..\legacy.php:685
11   1.6698   14759640   K2ModelItem->execPlugins( )   ..\view.html.php:54
12   1.7092   15489176   JEventDispatcher->trigger( )   ..\item.php:682
13   1.7092   15490088   JEvent->update( )   ..\dispatcher.php:161
14   1.7092   15490944   call_user_func_array ( )
..\event.php:71
15   1.7092   15490992   plgContentJw_sig->onContentPrepare( )   ..\event.php:71
16   1.7092   15491040   plgContentJw_sig->renderSimpleImageGallery( )   ..\jw_sig.php:44
Signatures appear only for members with more than 30 posts

#### RenzJW

• Newbie
• Posts: 4
##### Re: Undefined variable: defaultImagePath
« Reply #4 on: July 09, 2013, 12:36:12 am »
Hi! I think I've solved the problem but there's still an error message. At first, the image is not working, then I tried to remove some modules (because there are cases where a module or plugin is not compatible with one another) and yes, it worked fine. I've removed the Google Calendar module, now it's working but with still error message.

@goempie - maybe we have the same solution. Go try it out.

Here's the sample of my work, but still with error message above. Still need to remove this error message.
Signatures appear only for members with more than 30 posts

#### RenzJW

• Newbie
• Posts: 4
##### Re: Undefined variable: defaultImagePath
« Reply #5 on: July 09, 2013, 05:43:19 am »
Hi! Fixed it again. Just set your Error Reporting in the Server tab in Global Configuration to None.

Hope it helps you too.
Signatures appear only for members with more than 30 posts

#### goempie

• Newbie
• Posts: 3
##### Re: Undefined variable: defaultImagePath
« Reply #6 on: July 10, 2013, 05:20:37 am »
Ok, that's in any way the final solution. But the best choice?
Signatures appear only for members with more than 30 posts

#### RenzJW

• Newbie
• Posts: 4
##### Re: Undefined variable: defaultImagePath
« Reply #7 on: July 10, 2013, 05:25:12 am »
I did both of those two methods in order for me to work SIG fine.
Signatures appear only for members with more than 30 posts

#### vihuarar

• Newbie
• Posts: 1
##### Re: Undefined variable: defaultImagePath
« Reply #8 on: August 02, 2013, 04:45:05 pm »
I had the same problem... with the version 3.0.1 and joomla 3

I solve the problem buying the plugin...

The Pro version doesn't has the same problem

Signatures appear only for members with more than 30 posts

#### sclaggett

• Newbie
• Posts: 4
##### Re: Undefined variable: defaultImagePath
« Reply #9 on: August 06, 2013, 02:14:45 am »
I just got on here to report this issue.  Glad there is a work around but there really needs to be a patch to that.  Guess I need to go pro to get that.  Lets see how the testing goes.

Thanks for the fix.

Stuart
Signatures appear only for members with more than 30 posts

#### jmc

• Newbie
• Posts: 1
##### Re: Undefined variable: defaultImagePath
« Reply #10 on: September 15, 2013, 09:40:44 pm »
I’m having the same issue.(using wamp and joomla 2.5.9) Did any one ever find a fix, other than setting the Global Configuration to None?
Signatures appear only for members with more than 30 posts

#### terros

• Newbie
• Posts: 1
##### Re: Undefined variable: defaultImagePath
« Reply #11 on: November 08, 2013, 02:49:47 pm »
I’m having the same issue.(using wamp and joomla 2.5.9) Did any one ever find a fix, other than setting the Global Configuration to None?

Yes

line 123:
Code: [Select] [nofollow]
if (!$params)$params = class_exists('JParameter') ? new JParameter(null) : new JRegistry(null);

This check will never be true because $params is passed (by address) as an object and if it's null it will cause$params to become a JRegistry object without data. Ie. $params will always be an object without data and has no purpose in this function All parameters can be found in the var$plugin->params which are used on line 127:
Code: [Select] [nofollow]
$pluginParams = class_exists('JParameter') ? new JParameter($plugin->params) : new JRegistry($plugin->params); The rest of the code in the function are using$pluginParams as fallback when $params is empty so it works but generates a Notice on line 129: Code: [Select] [nofollow] $galleries_rootfolder = ($params->get('galleries_rootfolder')) ?$params->get('galleries_rootfolder') : $pluginParams->get('galleries_rootfolder',$defaultImagePath);
The reason is that $defaultImagePath is undefined. To get rid of the Notice remove$defaultImagePath on line 129:
Code: [Select] [nofollow]
$galleries_rootfolder = ($params->get('galleries_rootfolder')) ? $params->get('galleries_rootfolder') :$pluginParams->get('galleries_rootfolder');
This is completly safe since 'galleries_rootfolder' is set to 'images' if saved empty in the plugin-manager

Tip! 'Root folder for image galleries' may be set to . (dot) and gives the uportunity to have images in multiple root-folders (use absolute paths in {gallery})
« Last Edit: November 08, 2013, 02:55:02 pm by terros »
Signatures appear only for members with more than 30 posts

Find this topic helpful? Why not share it with others?