Keyword

Undefined variable: defaultImagePath

  • goempie
  • goempie's Avatar Topic Author
  • Offline
  • New Member
More
11 years 9 months ago #52968 by goempie
Undefined variable: defaultImagePath was created by goempie
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!

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

More
11 years 9 months ago #52969 by RenzJW
Replied by RenzJW on topic Re: Undefined variable: defaultImagePath
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

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

More
11 years 9 months ago #52970 by Katia
Replied by Katia on topic Re: Undefined variable: defaultImagePath
Where do you get this message?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • goempie
  • goempie's Avatar Topic Author
  • Offline
  • New Member
More
11 years 9 months ago #52971 by goempie
Replied by goempie on topic Re: Undefined variable: defaultImagePath
Thanks for your reply!
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

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

More
11 years 9 months ago #52972 by RenzJW
Replied by RenzJW on topic Re: Undefined variable: defaultImagePath
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.
Attachments:

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

More
11 years 9 months ago #52973 by RenzJW
Replied by RenzJW on topic Re: Undefined variable: defaultImagePath
Hi! Fixed it again. Just set your Error Reporting in the Server tab in Global Configuration to None.

Hope it helps you too.

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

  • goempie
  • goempie's Avatar Topic Author
  • Offline
  • New Member
More
11 years 9 months ago #52974 by goempie
Replied by goempie on topic Re: Undefined variable: defaultImagePath
Ok, that's in any way the final solution. But the best choice?

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

More
11 years 9 months ago #52975 by RenzJW
Replied by RenzJW on topic Re: Undefined variable: defaultImagePath
I did both of those two methods in order for me to work SIG fine.

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

More
11 years 8 months ago #52976 by Nettic
Replied by Nettic on topic Re: Undefined variable: defaultImagePath
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

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

More
11 years 8 months ago #52977 by Stuart Claggett
Replied by Stuart Claggett on topic Re: Undefined variable: defaultImagePath
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 ;D

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

More
11 years 7 months ago #52978 by jmc
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?

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

More
11 years 5 months ago - 11 years 5 months ago #52979 by terros
Replied by terros on topic Re: Undefined variable: defaultImagePath

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:
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:
$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:
$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:
$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})

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


Powered by Kunena Forum