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..
Hello All, Does anyone know how to inactivate product (abstract and concrete) so it is not returned
![U015HHFCU1M](https://us.v-cdn.net/6037907/uploads/defaultavatar/nNMRX71LIK73F.jpg)
Hello All,
Does anyone know how to inactivate product (abstract and concrete) so it is not returned in Glue anymore?
I have two stores. I detached it from both store via Zed panel but I can still see it in GET /catalog-search Glue endpoint.
Comments
-
giovanni.piemontese Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 π§π»βπ - CadetOptions
Maybe is the product still in ES? Did u checked it?
0 -
Nope. Is there a way to resync products?
0 -
giovanni.piemontese Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 π§π»βπ - CadetOptions
of course.. take a look to command
sync:data
0 -
Let me experiment a bit and I will come back with a feedback ASAP.
0 -
I'll do the same
0 -
Using latest spryker-shop/suite demo shop I can see that one message goes to the error queue after I deactivated a concrete product.
Failed to handle \"Entity.spy_product.update\" for listener \"Spryker\\Zed\\ProductListSearch\\Communication\\Plugin\\Event\\Listener\\ProductSearchListener\". Exception: \"Unable to execute SELECT statement [SELECT spy_product_category.id_product_category, spy_product_category.fk_category, spy_product_category.fk_product_abstract, spy_product_category.product_order, spy_category_node.id_category_node AS id_category_node FROM spy_product_category LEFT JOIN spy_category ON (spy_product_category.fk_category=spy_category.id_category) INNER JOIN spy_category_node ON (spy_category.id_category=spy_category_node.fk_category) LEFT JOIN spy_category_store ON (spy_category.id_category=spy_category_store.fk_category) LEFT JOIN spy_store ON (spy_category_store.fk_store=spy_store.id_store) WHERE spy_product_category.fk_product_abstract IN (:p1)]
Maybe this is the reason.
Could you check your rabbitmq as well?
0 -
Yes, one sec.
0 -
There are a lot of messages in error queue.
0 -
What would be the best way to see whats in there?
0 -
https://queue.spryker.local/#/queues/de-docker/publish.error
Set how many messages you want to retrieve.
0 -
working on it
0 -
It seems there issues with publishing:
{ "listenerClassName": "Spryker\\Zed\\ProductStorage\\Communication\\Plugin\\Event\\Listener\\ProductAbstractStoragePublishListener", "transferClassName": "Generated\\Shared\\Transfer\\EventEntityTransfer", "transferData": { "id": 1, "event": null, "name": null, "foreign_keys": [], "modified_columns": [], "original_values": [], "additional_values": [] }, "eventName": "Product.product_abstract.publish", "retry": 1, "retryMessage": "Retry on: Failed to handle \u0022Product.product_abstract.publish\u0022 for listener \u0022Spryker\\Zed\\ProductStorage\\Communication\\Plugin\\Event\\Listener\\ProductAbstractStoragePublishListener\u0022. Exception: \u0022Undefined index: US\u0022, \u0022#0 \/data\/vendor\/spryker\/rabbit-mq\/src\/Spryker\/Client\/RabbitMq\/Model\/Connection\/ConnectionManager.php(124): Spryker\\Shared\\ErrorHandler\\ErrorHandlerEnvironment-\u003ESpryker\\Shared\\ErrorHandler\\{closure}(8, \u0027Undefined index...\u0027, \u0027\/data\/vendor\/sp...\u0027, 124, Array)\n#1 \/data\/vendor\/spryker\/rabbit-mq\/src\/Spryker\/Client\/RabbitMq\/Model\/Publisher\/Publisher.php(131):
0 -
It seems this is related with incorrect store index.
0 -
I can see incorrect store code in spy_product_abstract_storage as well.
It's US and we have BR and GB only.0 -
That means that you haven't adjusted your configuration accordingly.
Check you deploy.*.yml files.0 -
It's there. Everything seem to work as expected.
0 -
Is there a way to clean up _storage tables?
Or to resync them?
Willsync:data
help here?0 -
What is there? Do you mean RMQ connections for US shop? If you don't have it, you need to remove it.
AFAIK
sync:data
will sync from _storage and _search tables to Redis and ES respectively.events:trigger
will update _storage and _search tables.0 -
Also I've run
docker/sdk reset
locally to check if my exception is reproducible. This time deactivating a concrete product ran without messages ending up into error queue. And after that/catalog-search
doesn't return deactivated product anymore.So to answer to the initial question: it's enough to just deactivate all concretes of needed abstract product and it will disappear from Redis\ES and from Glue respectively.
0 -
Yes, we removed US sometimes back. We have BR and GB now.
I triggeredevents:trigger
earlier today, but still see US in _storage table.0 -
Try
console publish:trigger-events --resource=product_abstract
andconsole publish:trigger-events --resource=product_concrete
respectively.0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 63 Spryker News
- 854 Developer Corner
- 719 Spryker Development
- 80 Spryker Dev Environment
- 360 Spryker Releases
- 3 Oryx frontend framework
- 33 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 21 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
- 66 Spryker Safari Questions
- 50 Random