Class not found
I'm working on a new module to add radio buttons as product option attributes. I created a class called Radio but xcart is not finding it. I keep getting the following error
[24-Mar-2015 09:43:41 America/Indiana/Indianapolis] PHP Fatal error: Class '\XLite\View\Product\AttributeValue\Admin\Radio' not found in /home/upflushi/www/var/run/classes/XLite/View/AViewAbstract.php on line 418 [24-Mar-2015 09:43:41] Error (code: 1): Class '\XLite\View\Product\AttributeValue\Admin\Radio' not found Server API: apache2handler; Request method: GET; URI: /admin.php?target=product&product_id=1&page=attribu tes; Backtrace: #0 Includes\ErrorHandler::logInfo(Class '\XLite\View\Product\AttributeValue\Admin\Radio' not found, 1) called at [/home/upflushi/www/Includes/ErrorHandler.php:324] #1 Includes\ErrorHandler::handleError(Array ([type] => 1,[message] => Class '\XLite\View\Product\AttributeValue\Admin\Radio' not found,[file] => /home/upflushi/www/var/run/classes/XLite/View/AViewAbstract.php,[line] => 418)) called at [/home/upflushi/www/Includes/ErrorHandler.php:309] #2 Includes\ErrorHandler::shutdown() The xlite.log contained Mar 24 09:57:59 XLite [warning] Warning: include_once(/home/upflushi/www/var/run/classes/XLite/Model/AttributeValue/AttributeValueRadio.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in /home/upflushi/www/Includes/Autoloader.php on line 125 Server API: apache2handler; Request method: GET; URI: /admin.php?target=product&product_id=1&page=attribu tes; Mar 24 09:57:59 XLite [warning] Warning: include_once() [<a href='function.include'>function.include</a>]: Failed opening '/home/upflushi/www/var/run/classes/XLite/Model/AttributeValue/AttributeValueRadio.php' for inclusion (include_path='.:/usr/local/lib/php:/home/upflushi/www/lib/') in /home/upflushi/www/Includes/Autoloader.php on line 125 Server API: apache2handler; Request method: GET; URI: /admin.php?target=product&product_id=1&page=attribu tes; Mar 24 09:57:59 XLite [warning] Warning: include_once(/home/upflushi/www/var/run/classes/XLite/View/Product/AttributeValue/Admin/Radio.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in /home/upflushi/www/Includes/Autoloader.php on line 125 Server API: apache2handler; Request method: GET; URI: /admin.php?target=product&product_id=1&page=attribu tes; Mar 24 09:57:59 XLite [warning] Warning: include_once() [<a href='function.include'>function.include</a>]: Failed opening '/home/upflushi/www/var/run/classes/XLite/View/Product/AttributeValue/Admin/Radio.php' for inclusion (include_path='.:/usr/local/lib/php:/home/upflushi/www/lib/') in /home/upflushi/www/Includes/Autoloader.php on line 125 Server API: apache2handler; Request method: GET; URI: /admin.php?target=product&product_id=1&page=attribu tes; Any ideas? |
Re: Class not found
Hello Phil,
How did you add the class? Where is the file with the class definition located? What is the source code? |
Re: Class not found
At the top of your radio.php, what is your namespace?
|
Re: Class not found
It is located in:
/classes/XLite/Module/Pmall/RadioButtonOptions/View/Product/AttributeValue/Admin/ PHP Code:
|
Re: Class not found
Where and how do you use this class?
Quote:
Quote:
These error messages make me believe that there is an error in the class name somewhere either in your templates, or in other PHP classes that reference the \XLite\Module\Pmall\RadioButtonOptions\View\Produc t\AttributeValue\Admin\Radio class. |
Re: Class not found
Hello Phil,
I feel you are referring to your new class as to PHP Code:
but you should refer to it as to PHP Code:
Please, let me know if it makes sense to you. Tony |
All times are GMT -8. The time now is 08:18 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.