Giter Site home page Giter Site logo

product cache issue about magento2 HOT 13 CLOSED

abhiramalli avatar abhiramalli commented on July 17, 2024
product cache issue

from magento2.

Comments (13)

devchris79 avatar devchris79 commented on July 17, 2024 1

@engcom-Dash I take it you didn't mean to add the reproduced issue label...

from magento2.

m2-assistant avatar m2-assistant commented on July 17, 2024

Hi @abhiramalli. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
πŸ•™ You can find the schedule on the Magento Community Calendar page.
πŸ“ž The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

from magento2.

m2-assistant avatar m2-assistant commented on July 17, 2024

Hi @engcom-Dash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: πŸ‘‡

    1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    1. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
    1. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

from magento2.

hostep avatar hostep commented on July 17, 2024

It sounds like your consumer isn't using a Factory to get the latest product data from the database before modifying the object? In this case you probably want to use a ProductInterfaceFactory. See https://magento.stackexchange.com/a/158098

If you do use a Factory and still have this issue, you'll have to post some code here to showcase the bug.

from magento2.

engcom-Dash avatar engcom-Dash commented on July 17, 2024

Hi @abhiramalli

Thanks for reporting and collaboration.

Can you please more information on the preconditions - rabbitmq consumer to consume incoming product data from external system.

Thanks.

from magento2.

abhiramalli avatar abhiramalli commented on July 17, 2024

@hostep I am using factories to to fetch product

from magento2.

abhiramalli avatar abhiramalli commented on July 17, 2024

@engcom-Dash
I have created queue known as product import quaue in rabbitmq
My external system is adding product data in json form
And i have built custom module to consume and create product and i also added eav attribute I'm product entity add unique id for product so that my external systems product id is matched to it,
While updating I am checking that already product with external system product id exists or not if exist I am fetching product from it using factory

from magento2.

abhiramalli avatar abhiramalli commented on July 17, 2024

and one more case
when i create product from external system using consumer and custom logic
and delete same product from magento admin
again try to push the same data from the external system , magento says product doesnot exists instead of creating new product

after debuging i found

image
issue is becacuse when i send same data in the above code it checkes id present or not,
if id not present it will take sku and try to fetch from get(sku) method
when it uses get(sku) method it is returning my old product from cache which is present before deleting ,
my consumer instance is not getting to know product is deleted from admin and also class level cache is not vanishing or removing(that is $this->instance[cacheKey]

from magento2.

abhiramalli avatar abhiramalli commented on July 17, 2024

@engcom-Dash
any updates

from magento2.

ananth-iyer avatar ananth-iyer commented on July 17, 2024

@abhiramalli you can use custom attribute to save product from external system.
For example, external_product_id.
To update products from external system, match the SKU from Magento 2.

from magento2.

m2-assistant avatar m2-assistant commented on July 17, 2024

Hi @engcom-Hotel. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: πŸ‘‡

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

from magento2.

engcom-Hotel avatar engcom-Hotel commented on July 17, 2024

Hello @abhiramalli,

I agree with @ananth-iyer here, please use the custom attribute to save the product from the external system.

And also if you are getting the same issue while updating the product even if you are using ProductInterfaceFactory then can you please provide us some codebase samples and screenshots to understand the issue more?

Thanks

from magento2.

engcom-Hotel avatar engcom-Hotel commented on July 17, 2024

Dear @abhiramalli,

We've observed that there haven't been any updates on this issue for quite some time. Therefore, we're assuming it's been resolved and will be closing it. Feel free to open a new ticket or reopen this one if you require further assistance.

Regards

from magento2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.