Topic-icon Fatal error on execution of the component

Active Subscriptions:

None
This is a different error than was listed in the other thread, so I thought it best to start my own.

The component installs fine, but when I try to run it, I get the following error:

Fatal error: Class 'VersionVerificationToolControllerHome' not found in /nfs/users/xxxxx/xxxxxxxxx/xxxxxxxx/administrator/components/com_versionverificationtool/admin.versionverificationtool.php on line 12
The topic has been locked.
Active Subscriptions:

None
14 years 1 month ago #3111 by yolabingo
The error occurs in 'admin.versionverificationtool.php, line 12:
 10         require_once('controller.php');
 11         
 12         $controller = new VersionVerificationToolControllerHome();

The class 'VersionVerificationToolControllerHome' is defined in controller.php, but it's obviously not getting loaded. Change line 10 to:
require_once(JPATH_COMPONENT.DS.'controller.php');

This appears to be the proper Joomla way to include this file.
The topic has been locked.
Active Subscriptions:

None
14 years 1 month ago #3152 by cmsmarket
That's odd. It works on my sites. I wonder if it's because I have . in the PATH and possibly you do not?

Either way, thanks for the fix, yolabingo!

ken, can you confirm that this fixes your issue? If so, I will update the code and put out another version.

Thank you both for helping!
The topic has been locked.
Active Subscriptions:

None
Yes, that did indeed fix the issue.

And given that it's the full path, I wouldn't think the . would be necessary, but perhaps it is. Since this is a live site, I'm somewhat reluctant to test it. <!-- s:-) --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->

Thanks!
The topic has been locked.
Active Subscriptions:

None
14 years 1 month ago #3154 by cmsmarket
I actually meant that the PHP include_path had . in it (meaning the current directory). If I go to Help -> System Info and look on the PHP Information tab, I see this:
include_path	.&#58;

I'm guessing that is why it works on my server.

Either way, I want to change the code so it works for everyone. I modified the code and I'm packaging version 1.3 and will have it up shortly.

Thanks for finding and helping fix the issue!
The topic has been locked.
Active Subscriptions:

None
14 years 1 month ago #3160 by cmsmarket
I just uploaded version 1.3. If you have some time, can you get it and make sure everything works properly on your system?

Thanks again for all the help.
The topic has been locked.
Active Subscriptions:

None
14 years 1 month ago #3216 by yolabingo
While debugging this, I confirmed that "." was in the path. However, PHP considered the current working directory to be elsewhere (I think it was "administrator/"). Since there was a file named "controller.php" in that directory, it would happily load that file and proceed.

We used this component on numerous sites, and saw this problem on about 1/5 of them. I suspect that the loading of another component played a role. This change does fix it in any case, and seems like a good disambiguation that is used by most other Joomla components.
The topic has been locked.
Active Subscriptions:

None
14 years 1 month ago #3228 by cmsmarket
Sounds good. Thanks for helping us fix it for others. If you have any other feedback, we're always listening.
The topic has been locked.