-2

I have a site with Drupal 8.8.4

I created a type of paragraph with an "Entity reference" field which refers to the products and a "Date range" field :

enter image description here

I created a type of store with "Entity reference revisions" field which refers to my previous paragraph :

enter image description here

THE PROBLEM

If I add 3 products to my reference field, they will appear in the rendering of my store.

If I remove 2 products from my reference field, they will still appear in the rendering of my store.

If I add 4 additional products to my reference field, I have a total of 7 products in the rendering of my store.

I understand absolutely nothing, because I do a drush cr and it does not change anything.

Here is an example. I had 4 products in the reference field. I registered my store. I modified my store and I deleted 3 references. There are still 4 products in the store rendering :

enter image description here

enter image description here

  • 1
    What's the point of your custom relation fields? Products already have a built-in relation to stores. – Hudri Mar 25 at 0:59
  • @Hudri This is not the question, I need this to add to a store products exhibited by other sellers but not sold in stores. – zen Mar 25 at 12:38
  • 1
    It is not clear to me what you are asking. The built-in relationship to stores is the thing that manages visibility in stores. – Hudri Mar 25 at 12:45
  • @Hudri This is not the problem, I created a view block under the store to display the products referenced in the field of my question. I know how trade works and that is not the question, I could have created this paragraph in a group or a node, the problem would be the same. Why when I delete a reference, it remains visible in the block ? – zen Mar 25 at 13:07
  • OK, this was the missing link. What is the base entity for your view block? ERR are not deleted from DB when removed, instead a new entry with same ID but different revision ID is created. Therefore Paragraphs should not be used as base entities for views. – Hudri Mar 25 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.