proudcommerce / psHelloWorld

OXID 6 module example
0 stars 1 forks source link

Example module not working #1

Closed linslin closed 6 years ago

linslin commented 6 years ago

I get this error message when trying out your example module. I've installed it via composer composer require proudcommerce/pshelloworld:dev-master but after activation in backend its throwing the following error message:

[05 Dec 15:39:43.668111 2017] [exception] [type OxidEsales\Eshop\Core\Exception\SystemComponentException] [code 0] [file C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\Module\ModuleChainsGenerator.php] [line 386] [message Module class ProudSourcing\HelloWorld\Controller\StartController not found. Module ID pshelloworld disabled] [05 Dec 15:39:43.668111 2017] [exception] [stacktrace] #0 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\Module\ModuleChainsGenerator.php(280): OxidEsales\EshopCommunity\Core\Module\ModuleChainsGenerator->onModuleExtensionCreationError('ProudSourcing\H...')

1 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\Module\ModuleChainsGenerator.php(238): OxidEsales\EshopCommunity\Core\Module\ModuleChainsGenerator->createClassExtension('start', 'ProudSourcing\H...')

2 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\Module\ModuleChainsGenerator.php(45): OxidEsales\EshopCommunity\Core\Module\ModuleChainsGenerator->createClassExtensions(Array, 'start')

3 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\UtilsObject.php(270): OxidEsales\EshopCommunity\Core\Module\ModuleChainsGenerator->createClassChain('OxidEsales\Esho...', 'start')

4 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\UtilsObject.php(219): OxidEsales\EshopCommunity\Core\UtilsObject->getClassName('start')

5 C:\development\webroot\test-shop\app\source\oxfunctions.php(103): OxidEsales\EshopCommunity\Core\UtilsObject->oxNew('OxidEsales\Esho...')

6 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\ShopControl.php(372): oxNew('OxidEsales\Esho...')

7 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\ShopControl.php(272): OxidEsales\EshopCommunity\Core\ShopControl->_initializeViewObject('OxidEsales\Esho...', NULL, NULL, NULL)

8 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\ShopControl.php(137): OxidEsales\EshopCommunity\Core\ShopControl->_process('OxidEsales\Esho...', NULL, NULL, NULL)

9 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\Oxid.php(26): OxidEsales\EshopCommunity\Core\ShopControl->start()

10 C:\development\webroot\test-shop\app\source\index.php(15): OxidEsales\EshopCommunity\Core\Oxid::run()

11 {main}

proudcommerce commented 6 years ago

for composer you have to use this branch (see readme) ;-)

composer require proudcommerce/pshelloworld:dev-packagist

linslin commented 6 years ago

Thanks for your fast answer. But also uninstall and re-install via composer require proudcommerce/pshelloworld:dev-packagist results in:

[05 Dec 15:53:13.429584 2017] [exception] [type OxidEsales\Eshop\Core\Exception\SystemComponentException] [code 0] [file C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\UtilsObject.php] [line 222] [message EXCEPTION_SYSTEMCOMPONENT_CLASSNOTFOUND StartController] [05 Dec 15:53:13.429584 2017] [exception] [stacktrace] #0 C:\development\webroot\test-shop\app\source\oxfunctions.php(103): OxidEsales\EshopCommunity\Core\UtilsObject->oxNew('OxidEsales\Esho...')

1 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\ShopControl.php(372): oxNew('OxidEsales\Esho...')

2 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\ShopControl.php(272): OxidEsales\EshopCommunity\Core\ShopControl->_initializeViewObject('OxidEsales\Esho...', NULL, NULL, NULL)

3 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\ShopControl.php(137): OxidEsales\EshopCommunity\Core\ShopControl->_process('OxidEsales\Esho...', NULL, NULL, NULL)

4 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\Oxid.php(26): OxidEsales\EshopCommunity\Core\ShopControl->start()

5 C:\development\webroot\test-shop\app\source\index.php(15): OxidEsales\EshopCommunity\Core\Oxid::run()

6 {main}

[05 Dec 15:53:13.430421 2017] [exception] [type OxidEsales\Eshop\Core\Exception\SystemComponentException] [code 0] [file C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\UtilsObject.php] [line 222] [message EXCEPTION_SYSTEMCOMPONENT_CLASSNOTFOUND StartController] [05 Dec 15:53:13.430421 2017] [exception] [stacktrace] #0 C:\development\webroot\test-shop\app\source\oxfunctions.php(103): OxidEsales\EshopCommunity\Core\UtilsObject->oxNew('OxidEsales\Esho...')

1 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\ShopControl.php(372): oxNew('OxidEsales\Esho...')

2 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\ShopControl.php(272): OxidEsales\EshopCommunity\Core\ShopControl->_initializeViewObject('OxidEsales\Esho...', NULL, NULL, NULL)

3 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\ShopControl.php(137): OxidEsales\EshopCommunity\Core\ShopControl->_process('OxidEsales\Esho...', NULL, NULL, NULL)

4 C:\development\webroot\test-shop\app\vendor\oxid-esales\oxideshop-ce\source\Core\Oxid.php(26): OxidEsales\EshopCommunity\Core\ShopControl->start()

5 C:\development\webroot\test-shop\app\source\index.php(15): OxidEsales\EshopCommunity\Core\Oxid::run()

6 {main}

This is the output of composer show:

amzn/amazon-pay-sdk-php                           3.1.0                 Amazon Pay SDK (PHP)
behat/mink                                        v1.5.0                Web acceptance testing framework for PHP 5.3
behat/mink-browserkit-driver                      v1.1.0                Symfony2 BrowserKit driver for Mink framework
behat/mink-goutte-driver                          v1.0.9                Goutte driver for Mink framework
bestit/amazonpay4oxid                             3.0.2                 This is the Amazon Pay module for the OXID eShop.
composer/ca-bundle                                1.0.9                 Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.
composer/composer                                 1.5.2                 Composer helps you declare, manage and install dependencies of PHP projects, ensuring you have the right stack everywhere.
composer/semver                                   1.4.2                 Semver library that offers utilities, version constraint parsing and validation.
composer/spdx-licenses                            1.1.6                 SPDX licenses list and validation library.
ddoe/wysiwyg-editor-module                        v2.0.0                Summernote WYSIWYG Editor for OXID eShop.
doctrine/annotations                              v1.4.0                Docblock Annotations Parser
doctrine/cache                                    v1.6.2                Caching library offering an object-oriented API for many cache backends
doctrine/collections                              v1.4.0                Collections Abstraction library
doctrine/common                                   v2.7.3                Common Library for Doctrine projects
doctrine/dbal                                     v2.5.12               Database Abstraction Layer
doctrine/inflector                                v1.1.0                Common String Manipulations with regard to casing and singular/plural rules.
doctrine/instantiator                             1.1.0                 A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                                    v1.0.1                Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
doctrine/migrations                               v1.5.0                Database Schema migrations using Doctrine DBAL
fabpot/goutte                                     v1.0.7                A simple PHP Web Scraper
guzzle/common                                     v3.9.2                Common libraries used by Guzzle
guzzle/http                                       v3.9.2                HTTP libraries used by Guzzle
guzzle/parser                                     v3.9.2                Interchangeable parsers used by Guzzle
guzzle/stream                                     v3.9.2                Guzzle stream wrapper component
incenteev/composer-parameter-handler              v2.1.2                Composer script handling your ignored parameter file
justinrainbow/json-schema                         5.2.6                 A library to validate a json schema.
linslin/oxid6-example-module                      dev-master f598c47
mikey179/vfsStream                                v1.4.0
monolog/monolog                                   1.23.0                Sends your logs to files, sockets, inboxes, databases and various web services
ocramius/proxy-manager                            1.0.2                 A library providing utilities to generate, instantiate and generally operate with Object Proxies
oxid-esales/azure-theme                           v1.4.1                This is Azure Theme for OXID eShop.
oxid-esales/coding-standards                      v3.0.3                OXID eShop coding standards
oxid-esales/eshop-edition-facts                   v1.0.0                OXID eShop edition getter
oxid-esales/eshop-facts                           v1.0.2                OXID eShop facts
oxid-esales/flow-theme                            v2.3.1                This is Flow Theme for OXID eShop.
oxid-esales/mink-selenium-driver                  v1.1.2                Selenium driver for Mink framework
oxid-esales/oxideshop-ce                          v6.0.0                This package contains OXID eShop CE source code.
oxid-esales/oxideshop-composer-plugin             v2.0.1                This file is mean to be used to install OXID eShop compilation.
oxid-esales/oxideshop-db-views-generator          v1.1.1                OXID eShop database views regeneration from console command
oxid-esales/oxideshop-demodata-ce                 v6.0.0                This is the demodata for OXID eShop CE.
oxid-esales/oxideshop-demodata-installer          v1.1.1                This tool is used to copy pictures from demo data repository to OXID eShop, during setup process.
oxid-esales/oxideshop-doctrine-migration-wrapper  v2.1.0                OXID eShop database migrations using doctrine
oxid-esales/oxideshop-facts                       v2.1.0                OXID eShop facts
oxid-esales/oxideshop-ide-helper                  v3.0.0                OXID eShop IDE helper for code completion
oxid-esales/oxideshop-metapackage-ce              v6.0.0                This is OXID eShop compilation metapackage.
oxid-esales/oxideshop-unified-namespace-generator v1.0.0                OXID eShop related utility, which generates edition-specific class files for the 'unified namespace'
oxid-esales/paymorrow-module                      v2.0.0                This is Paymorrow module for OXID eShop.
oxid-esales/paypal-module                         v5.1.3                This is the PayPal module for the OXID eShop.
oxid-esales/php-selenium                          v1.0.5                PHP Library for Selenium
oxid-esales/testing-library                       v3.3.0                OXID eShop testing library
payone-gmbh/oxid-6                                1.0.4                 The PAYONE module for Oxid 6
pdepend/pdepend                                   2.5.0                 Official version of pdepend to be handled with Composer
phpdocumentor/reflection-common                   1.0.1                 Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock                 4.2.0                 With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.
phpdocumentor/type-resolver                       0.4.0
phpmailer/phpmailer                               v5.2.26               PHPMailer is a full-featured email creation and transfer class for PHP
phpspec/prophecy                                  1.7.3                 Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage                         2.2.4                 Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator                         1.4.5                 FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template                         1.2.1                 Simple template engine.
phpunit/php-timer                                 1.0.9                 Utility class for timing
phpunit/php-token-stream                          1.4.12                Wrapper around PHP's tokenizer extension.
phpunit/phpcov                                    2.0.2                 CLI frontend for PHP_CodeCoverage
phpunit/phpunit                                   4.8.26                The PHP Unit Testing framework.
phpunit/phpunit-mock-objects                      2.3.8                 Mock Object library for PHPUnit
proudcommerce/pshelloworld                        dev-packagist 74889ba Proud Sourcing Demo-Modul
psr/log                                           1.0.2                 Common interface for logging libraries
sebastian/comparator                              1.2.4                 Provides the functionality to compare PHP values for equality
sebastian/diff                                    1.4.3                 Diff implementation
sebastian/environment                             1.3.8                 Provides functionality to handle HHVM/PHP environments
sebastian/exporter                                1.2.2                 Provides the functionality to export PHP variables for visualization
sebastian/finder-facade                           1.2.2                 FinderFacade is a convenience wrapper for Symfony's Finder component.
sebastian/global-state                            1.1.1                 Snapshotting of global state
sebastian/recursion-context                       1.0.5                 Provides functionality to recursively process PHP variables
sebastian/version                                 1.0.6                 Library that helps with managing the version number of Git-hosted PHP projects
seld/cli-prompt                                   1.0.3                 Allows you to prompt for user input on the command line, and optionally hide the characters they type
seld/jsonlint                                     1.6.1                 JSON Linter
seld/phar-utils                                   1.0.1                 PHAR file format utilities, for when PHP phars you up
smarty/smarty                                     v2.6.31               Smarty - the compiling PHP template engine
squizlabs/php_codesniffer                         2.9.1                 PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.
symfony/browser-kit                               v2.8.32               Symfony BrowserKit Component
symfony/config                                    v3.2.14               Symfony Config Component
symfony/console                                   v2.8.30               Symfony Console Component
symfony/css-selector                              v2.8.32               Symfony CssSelector Component
symfony/debug                                     v3.0.9                Symfony Debug Component
symfony/dependency-injection                      v3.1.10               Symfony DependencyInjection Component
symfony/dom-crawler                               v2.7.39               Symfony DomCrawler Component
symfony/event-dispatcher                          v3.2.14               Symfony EventDispatcher Component
symfony/filesystem                                v3.3.12               Symfony Filesystem Component
symfony/finder                                    v2.8.30               Symfony Finder Component
symfony/polyfill-mbstring                         v1.6.0                Symfony polyfill for the Mbstring extension
symfony/process                                   v2.8.30               Symfony Process Component
symfony/yaml                                      v2.8.30               Symfony Yaml Component
theseer/fdomdocument                              1.6.6                 The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom me...
webmozart/assert                                  1.2.0                 Assertions to validate method input/output with nice error messages.
webmozart/glob                                    4.1.0                 A PHP implementation of Ant's glob.
webmozart/path-util                               2.3.0                 A robust cross-platform utility for normalizing, comparing and modifying file paths.
zendframework/zend-code                           2.6.3                 provides facilities to generate arbitrary code using an object oriented interface
zendframework/zend-eventmanager                   3.2.0                 Trigger and listen to events within a PHP application
proudcommerce commented 6 years ago

does the composer autoloader know the module?

linslin commented 6 years ago

It seems like, this is a output of my composer.lock:

   {
            "name": "proudcommerce/pshelloworld",
            "version": "dev-packagist",
            "source": {
                "type": "git",
                "url": "https://github.com/proudcommerce/psHelloWorld.git",
                "reference": "74889baa26570b32b05b1c25e52ebb1404c2e526"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/proudcommerce/psHelloWorld/zipball/74889baa26570b32b05b1c25e52ebb1404c2e526",
                "reference": "74889baa26570b32b05b1c25e52ebb1404c2e526",
                "shasum": ""
            },
            "type": "oxideshop-module",
            "extra": {
                "oxideshop": {
                    "target-directory": "ps/pshelloworld"
                }
            },
            "autoload": {
                "psr-4": {
                    "ProudSourcing\\HelloWorld\\": "../../../source/modules/ps/pshelloworld"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "GNU"
            ],
            "description": "Proud Sourcing Demo-Modul",
            "homepage": "https://github.com/proudcommerce/psHelloWorld",
            "keywords": [
                "OXID",
                "demo",
                "modules"
            ],
            "time": "2017-11-09T09:33:08+00:00"
        },

This should be fine, isnt it?

proudcommerce commented 6 years ago

test again in a fresh oxid 6 and its working :-( so not really a bug imho.

for discussion use: https://forum.oxid-esales.com/t/oxid-6-module-with-namespaces-not-working/92615

linslin commented 6 years ago

Thanks. Which OS are you using?