What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
hi, I come with another issue, I get an error prompt when going to `
hi, I come with another issue,
I get an error prompt when going to <http://zed.en.suite.local/availability-gui>
Ill add logs and error messages in replies
Comments
-
in propel.log i get
[2020-12-10T08:33:39.288657+00:00] defaultLogger.ERROR: SQLSTATE[42P01]: Undefined table: 7 ERROR: missing FROM-clause entry for table "spy_stock" LINE 1: ...ct"."id_product"=spy_stock_product.fk_product AND spy_stock.... ^ [] []
application and exception logs remain empty
0 -
when I check console I get 500 from
<http://zed.en.suite.local/availability-gui/index/availability-abstract-table>
Unable to execute SELECT statement [SELECT spy_product_abstract.id_product_abstract, spy_product_abstract.fk_tax_set, spy_product_abstract.attributes, spy_product_abstract.color_code, spy_product_abstract.new_from, spy_product_abstract.new_to, spy_product_abstract.sku, spy_product_abstract.created_at, spy_product_abstract.updated_at, "spy_product_abstract_localized_attributes"."name" AS productName, spy_availability_abstract.quantity AS availabilityQuantity, GROUP_CONCAT(spy_stock_product.is_never_out_of_stock) AS concreteNeverOutOfStockSet, SUM(spy_stock_product.quantity) AS stockQuantity, GROUP_CONCAT(CONCAT("spy_product"."sku",':',"spy_oms_product_reservation"."reservation_quantity")) AS reservationQuantity FROM spy_product_abstract INNER JOIN spy_availability_abstract ON (spy_product_abstract.sku=spy_availability_abstract.abstract_sku) LEFT JOIN spy_product ON (spy_product_abstract.id_product_abstract="spy_product"."fk_product_abstract") LEFT JOIN spy_stock_product ON ("spy_product"."id_product"=spy_stock_product.fk_product AND spy_stock.id_stock=spy_stock_product.fk_stock) LEFT JOIN spy_oms_product_reservation ON ("spy_product"."sku"="spy_oms_product_reservation"."sku" AND spy_availability_abstract.fk_store="spy_oms_product_reservation"."fk_store") INNER JOIN "spy_product_abstract_localized_attributes" ON (spy_product_abstract.id_product_abstract="spy_product_abstract_localized_attributes"."fk_product_abstract") WHERE "spy_product_abstract_localized_attributes"."fk_locale"=:p1 AND spy_availability_abstract.fk_store=:p2 AND 1<>1 GROUP BY spy_product_abstract.id_product_abstract,spy_product_abstract.fk_tax_set,spy_product_abstract.attributes,spy_product_abstract.color_code,spy_product_abstract.new_from,spy_product_abstract.new_to,spy_product_abstract.sku,spy_product_abstract.created_at,spy_product_abstract.updated_at,"spy_product_abstract_localized_attributes"."name",spy_availability_abstract.quantity]
0 -
does anyone have and idea what's going on?
0 -
Hi, dunno whats ur problem. Have you tryed to run propel:install or assigned the warehouse unter http://shop/stock-gui/warehouse/list ?
0 -
I've run propel:install
0 -
are you sure assigning a warehouse would solve the missing join problem? because it seems to me that for some reason spy_stock is not joined in this query
0 -
ok, I tracked this issue to class
vendor/spryker/availability/src/Spryker/Zed/Availability/Persistence/AvailabilityQueryContainer.php
method querySpyProductAbstractAvailabilityWithStock
spy_stock is joined only if $stockNames is not emptyif (count($stockNames) > 0) { $joinStockProduct = (new Join())->setRightTableName(SpyStockTableMap::TABLE_NAME); $joinStockProduct->setJoinType(Criteria::LEFT_JOIN); $stockTypeCriterion = (new Criteria())->getNewCriterion( SpyStockTableMap::COL_NAME, $stockNames, Criteria::IN ); $joinStockProduct->setJoinCondition($stockTypeCriterion); $query->addJoinObject($joinStockProduct); }
but I if I understand correctly whats going on its used in next join whether it was joined earlier or not
$query->addJoin( [ SpyProductTableMap::COL_ID_PRODUCT, SpyStockTableMap::COL_ID_STOCK, ], [ SpyStockProductTableMap::COL_FK_PRODUCT, SpyStockProductTableMap::COL_FK_STOCK, ], Criteria::LEFT_JOIN )
I realize that empty $stockNames is a corner case, but the fact this seems not to be checked anywhere, and one could even call this method using defalut parameter value makes me think that this method should either
β’ handle empty $stockNames
β’ disallow empty $stockNames explicitly
Or I am entirely wrong about this π
Now I wish someone from spryker peeked into this conversation π0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 924 Developer Corner
- 783 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random