Hello
I am in the process of attempting to install a magento theme Quckstart package
i have followed the instructions supplied by the vendor to
1. extract the quickstart files to www under a directory called Magento2
2. Set up database and imported the supplied sample data
3.Verified Composer is installed successfully and that i have no extensions excluded
My error occurs when i wish to setup the static content ready to deploy to the Magento store.
i have opened a CMD Window as administrator,changed to the sub directory Magento2/bin and typed the
command: php magento setup:static-content:deploy. I receive the following error:
C:\Ampps\www\Magento2\bin>php magento setup:static-content:deploy -v
[InvalidArgumentException]
There are no commands defined in the "setup:static-content" namespace.
Did you mean one of these?
setup
setup:config
setup:cron
setup:db-data
setup:db-schema
setup:db
setup:di
setuperformance
setup:store-config
Exception trace:
() at C:\Ampps\www\Magento2\vendor\symfony\console\Symfony\Component\Console\Application.php:501
Symfony\Component\Console\Application->findNamespace() at C:\Ampps\www\Magento2\vendor\symfony\console\Symfony\Component\Console\Application.php:535
Symfony\Component\Console\Application->find() at C:\Ampps\www\Magento2\vendor\symfony\console\Symfony\Component\Console\Application.php:192
Symfony\Component\Console\Application->doRun() at C:\Ampps\www\Magento2\vendor\magento\framework\Console\Cli.php:49
Magento\Framework\Console\Cli->doRun() at C:\Ampps\www\Magento2\vendor\symfony\console\Symfony\Component\Console\Application.php:126
Symfony\Component\Console\Application->run() at C:\Ampps\www\Magento2\bin\magento:25
From my searching of google there are many explanations given for this error.
Can someone assist me narrow down the options for me?
i have attempted to install using two localhost packages with the same result. i also dont experience the name space error when i did a test install with the Magento instance with supplied data from the Magento web site. To me this indicates a problem related to the supplied Can anyone suggest some diagnosis steps i could go through to narrow down the problem? Chris
Hello again Stanislav
Thanks for the advice. I did the following:
1. renamed the composer.json file to composerTEST.json
2. reran the command: php magento setup:static-content:deploy -v
3. Result was the same error except the question was not present:
Did you mean one of these?
setup
setup:config
setup:cron
setup:db-data
setup:db-schema
setup:db
setup:di
setuperformance
setup:store-config
i.e.The error message was
C:\Ampps\www\Magento2\bin>php magento setup:static-content:deploy -v
[InvalidArgumentException]
There are no commands defined in the "setup:static-content" namespace.
Exception trace:
() at C:\Ampps\www\Magento2\vendor\symfony\console\Symfony\Component\Console\Application.php:501
Symfony\Component\Console\Application->findNamespace() at C:\Ampps\www\Magento2\vendor\symfony\console\Symfony\Component\Console\Application.php:535
Symfony\Component\Console\Application->find() at C:\Ampps\www\Magento2\vendor\symfony\console\Symfony\Component\Console\Application.php:192
Symfony\Component\Console\Application->doRun() at C:\Ampps\www\Magento2\vendor\magento\framework\Console\Cli.php:49
Magento\Framework\Console\Cli->doRun() at C:\Ampps\www\Magento2\vendor\symfony\console\Symfony\Component\Console\Application.php:126
Symfony\Component\Console\Application->run() at C:\Ampps\www\Magento2\bin\magento:25
I also checked permissions by running the command: magento-cleanup.php
I obtained this programme off the Magento site i think.
Shown below is the output from running this command.
Do you have any other suggestions? I have no idea what Composer does but I was wondering whether i need to have Composer running and run the command magento setup:static-content:deploy -v from there? Chris
C:\Ampps\www\Magento2>php magento-cleanup.php
----------------------- CLEANUP START -------------------------<br/><br/>*************** SETTING PERMISSIONS ***************<br/>Setting all folder permissions to 755<br/>Setting all file permissions to 644<br/>Setting pear permissions to 550<br/>PHP Warning: chmod(): No such file or directory in C:\Ampps\www\Magento2\magento-cleanup.php on line 45
Warning: chmod(): No such file or directory in C:\Ampps\www\Magento2\magento-cleanup.php on line 45
<br/>****************** CLEARING CACHE ******************<br/>Clearing var/cache<br/><br/>************** CHECKING FOR EXTENSIONS ***********<br/>-= WARNING =- Overrides or extensions exist in the app/code/local folder<br/>-= WARNING =- Overrides or extensions exist in the app/code/community folder<br/><br/>------------------- CLEANUP COMPLETED in:63.7516 seconds ------------------<br/>
Hello
As one diagnostic step I have since tried the CLI magento command that lists all the commands: php magento list
The output is shown below. I have concluded from reviewing this long list that the command: setup:static-content:deploy does not exist! This situation clearly explains why I am getting the error message.
So my question then is:
How can the command setup:static-content:deploy disappear?
is this disappearance due to a new version or release of Magento from 2.00 to 2.04.
I note there "is" a command: sampledata:deploy. I dont think this command does the same thing as "setup:static-content:deploy".
Any advice/ comments appreciated. Chris
-----------------------------------------------------------------------------------------------------------------------------------------------
C:\Ampps\www\Magento2\bin>php magento list
Magento CLI version 2.0.4
Usage:
command [options] [arguments]
Options:
--help (-h) Display this help message
--quiet (-q) Do not output any message
--verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version (-V) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
--no-interaction (-n) Do not ask any interactive question
Available commands:
help Displays help for a command
list Lists commands
admin
admin:user:create Creates an administrator
i18n
i18n:collect-phrases Discovers phrases in the codebase
i18nack Saves language package
info
info:adminuri Displays the Magento Admin URI
info:backups:list Prints list of available backup files
info:currency:list Displays the list of available currencies
info:dependencies:show-framework Shows number of dependencies on Magento framework
info:dependencies:show-modules Shows number of dependencies between modules
info:dependencies:show-modules-circular Shows number of circular dependencies between modules
info:language:list Displays the list of available language locales
info:timezone:list Displays the list of available timezones
maintenance
maintenance:allow-ips Sets maintenance mode exempt IPs
maintenance:disable Disables maintenance mode
maintenance:enable Enables maintenance mode
maintenance:status Displays maintenance mode status
module
module:disable Disables specified modules
module:enable Enables specified modules
module:status Displays status of modules
module:uninstall Uninstalls modules installed by composer
sampledata
sampledata:deploy Deploy sample data modules
sampledata:remove Remove all sample data packages from composer.json
setup
setup:backup Takes backup of Magento Application code base, media and database
setup:config:set Creates or modifies the deployment configuration
setup:cron:run Runs cron job scheduled for setup application
setup:db-data:upgrade Installs and upgrades data in the DB
setup:db-schema:upgrade Installs and upgrades the DB schema
setup:db:status Checks if DB schema or data requires upgrade
setup:di:compile Generates DI configuration and all non-existing interceptors and factories
setup:di:compile-multi-tenant Generates all non-existing proxies and factories, and pre-compile class definitions, inheritance information and plugin definitions
setup:install Installs the Magento application
setuperformance:generate-fixtures Generates fixtures
setup:rollback Rolls back Magento Application codebase, media and database
setup:store-config:set Installs the store configuration
setup:uninstall Uninstalls the Magento application
setup:upgrade Upgrades the Magento application, DB data, and schema
Hello,
>I am in the process of attempting to install a magento theme Quckstart package
Do you have Magento installed and working before installing custom theme?
Stanislav
Hello again Stanislav
Thanks for your question. Yes i have been struggling to understand the install process that I should follow for Magento 2.
There does not seem to be a consistent process for a supplied Magento 2 theme across vendors . Perhaps you could comment here?
The supplied quickstart package contains a working magento2 instance and sample data so my current approach I am using is as follows:
1) Install Composer
2) Create database
3) import supplied sample data.sql
4) Copy supplied quickstart magento files to a defined Magento 2 root directory
5) Run Composer Install command from the Magento 2 root directory from a CMD session ( uses composer.json file)
Note: I see the sub-directory called "setup" also has a composer.json file. Should i run composer install from the setup directory as well?
6) I am forced to Ignore php Magento "setup:static-content: deploy" command because this command does not exist
7) Open browser and go to Magento 2 root directory and run the standard Magento 2 installer. Answer all the normal prompts
The above process fails after I Click "install now" near the end of the Magento 2 Installer screens.
I receive a database exception 1022 Cant write , duplicate key in table "mg_store_group"
My search of the forums indicates I need to clear the database which is not possible since i will loose the supplied sample data.
What am I doing wrong? Chris
Hello,
>3) import supplied sample data.sql
Have you tried to download "Magento 2 with sample data" from:
https://www.magentocommerce.com/download
and install it with web-installer?
Stanislav
Hello Stanislav
Can you clarify your question. Are you saying I should complete a separate install of Magento 2 that includes the "Magento" supplied sample data just to test the process? If yes then I have already done this to validate the process for a clean install.
What I am not clear on is: Do I need to install a fresh install of Magento 2 "first" before I copy the quickstart files supplied by the vendor.
This step does not seem intuitive to me because the quickstart package "includes' a copy of Magento 2 already so I thought all I had to do was to import the vendors supplied database.sql file and run the magento 2 setup wizard that is provided by the vendor supplied Magento 2 instance.
I am trying to avoid having to do a "manual" install of the vendor supplied template files that "does" require a working Magento 2 install because for a newbie the integration is a challenging task.
One recent thing I have learnt from Google is there is now a browser dependency with Magento 2 installs. Certain browsers cause errors . I am using Firefox but will be trying Chrome as well
Any help appreciated. Chris
Hello,
If you are able to install Magento from official website then you should contact the vendor and ask why the "the quickstart package" does not work.
Stanislav
Hello again Stanislav
Yes I have already pursued my questions with the developer. The advice provided did allow me to progress but then I was experiencing console errors at the final install. What did solve the console errors problem is:
1). Changing to another browser Chrome - while I "did" clear the browser cache in the previous browser each time, simply changing browsers stablised the process.
2) Making sure when adding a database prefix (e.g. mg_) to the vendor provided database MySQL file that the prefix changes are completed "across the tables list that spans " multiple pages" I.e. I had nievely been setting up a database prefix for only a limited number of MySQL tables. This issue occurred because I had decided to add a prefix during the setup wizard database
definition process.
As a result of following the above steps I successfully installed the theme. Chris