dockerized-magento
dockerized-magento copied to clipboard
After installation Admin area unacessible
I did everything what is said in README.md to get docekrized-magent.local running.
I run Debian 9 (Stretch) and every step of Docker install went smooth.
When ./magent start
was done i visited http://dockerized-magento.local/admin
and entered admin/password123 credentials.
This is what was displayed on the screen, please help to get solution:
Should I run it with sudo? Like sudo ./magento start
? I managed to add my regular user to docker group...
Have you looked at what the error is? no one can help you unless we know what the error is.
So I got the same error, well i'm guessing it's the same error:
a:5:{i:0;s:698:"SQLSTATE[42S22]:
Column not found: 1054 Unknown column 'sales_bestsellers_aggregated_yearly.product_type_id' in 'field list', query was: SELECT COUNT(*) FROM (SELECT MAX(DATE_FORMAT(period, '%Y-%m-%d')) AS period
, SUM(qty_ordered) AS qty_ordered
, sales_bestsellers_aggregated_yearly
.product_id
, MAX(product_name) AS product_name
, MAX(product_price) AS product_price
, sales_bestsellers_aggregated_yearly
.product_type_id
FROM sales_bestsellers_aggregated_yearly
WHERE (EXISTS (SELECT 1 FROM catalog_product_entity
AS existed_products
WHERE (sales_bestsellers_aggregated_yearly.product_id = existed_products.entity_id))) AND (store_id IN(0)) GROUP BY product_id
LIMIT 5) AS t
";i:1;s:4693:"#0 /var/www/html/web/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
to fix the issue, add a new field to "sales_bestsellers_aggregated_yearly", make it an INT and name it "product_type_id"
@staljaard thank you for error analysis, I was away from keyboard. Best regards
pleasure
Found another missing column. Just go to [Catalog] > [Manage Products] > First item in list. Thrown error is
SQLSTATE[42S22]: Column not found: 1054 Unknown column
'catalog_product_entity_group_price.is_percent' in 'field list'.
query was: SELECT `catalog_product_entity_group_price`.`value_id` AS `price_id`,
`catalog_product_entity_group_price`.`website_id`,
`catalog_product_entity_group_price`.`all_groups`,
`catalog_product_entity_group_price`.`customer_group_id` AS `cust_group`,
`catalog_product_entity_group_price`.`value` AS `price`,
`catalog_product_entity_group_price`.`is_percent` FROM `catalog_product_entity_group_price`
WHERE (entity_id='905') AND (website_id = 0)
I would create missing field but I don't know what type it should have, @staljaard could You help please? Where to look for that type?
I'm having this exact problem with the sales_bestsellers_aggregated_yearly.product_type_id
being missing.
Why are these columns missing? Is the sample data out of sync with the Magneto code?
@gitowiec I made the data type for is_percent
an int
and it appears to work.
@rsutton1 thanks. If you find out whats the type of sales_bestsellers_aggregated_yearly.product_type_id
please post it here.
desc sales_bestsellers_aggregated_yearly; +-----------------+----------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------+----------------------+------+-----+---------+----------------+ | id | int(10) unsigned | NO | PRI | NULL | auto_increment | | period | date | YES | MUL | NULL | | | store_id | smallint(5) unsigned | YES | MUL | NULL | | | product_id | int(10) unsigned | YES | MUL | NULL | | | product_type_id | varchar(32) | NO | | simple | | | product_name | varchar(255) | YES | | NULL | | | product_price | decimal(12,4) | NO | | 0.0000 | | | qty_ordered | decimal(12,4) | NO | | 0.0000 | | | rating_pos | smallint(5) unsigned | NO | | 0 | | +-----------------+----------------------+------+-----+---------+----------------+
To resolve the issue all you need to do is clear the cache:
you can do so by running the following command (possible over kill but the redis one is 100% necessary)
on your local run the following:
./magento magerun cache:dir:flush
./magento magerun cache:clean
./magento magerun index:reindex:all
To enter the bash of the redis container run: ./magento enter dockerizedmagento_cache_1
Once in the redis container (i.e. root@a43067ce0136:/data#
) run redis-cli flushall
Then reload your admin. :)
Had same issue @alexkoepke solution was perfect
@alexkoepke Is the "clear the cache" through PuTTY?
The solution by @alexkoepke is correct for this type of errors. If you're on windows, probably ./magento script won't run, so the command should be docker exec cacheContainerID redis-cli flushall
replace cacheContainerID with id for the cache container, which you can find out by using: docker ps
the solution by @alexkoepke works for me. :) here is the answer on StackOverflow https://stackoverflow.com/a/42231851/3281975