Closed markusmo closed 4 years ago
When I add or change the cms I get site-packages/cms/plugin_base.py:286: DontUsePageAttributeWarning: Don't use the page attribute on CMSPlugins! CMSPlugins are not guaranteed to have a page associated with them! page=obj.page
And as I have a look at my categories the CatalogList
still does not filter my products to their assigned CMSPages. Could it be, that this warning is indicating, that my CMSPages are not working properly?
You should only add the "Catalog List" as CMSApp to pages, which actually need to render a list view of products. This also handles the routing of the product's detail view.
Could it be, that this warning is indicating, that my CMSPages are not working properly?
No, that warning originates from the CMS itself. If a plugin isn't associated with a page, for example in the clipboard, then the obj.page
attribute is None
. There is nothing special about this.
EDIT:
Disregard what I wrote earlier... I had the wrong implementation in my CatalogListApp
.
I added CMSPagesFilterBackend
and then I got it working.
So that I get it right: I have a "catalog" CMS-page, which is configured as a "Catalog List" and my categories, which are sub-CMS-pages also have to have "Catalog List". Then my product, which should be displayed in my "catalog" and my category does have both CMS-pages assigned in their configuration? When I configure it that way, I always get all products in my "catalog" and my subcategory
all four "categories" (Catalog, Smart Cards, Earphones, Smartphones) which actually are CMS-pages) have the "Catalog List" app assigned to them.
Then we can assign each product to one or more of those categories / CMS-pages:
Thanks :-)
I am a bit confused. I am configuring my Catalog with CMS. I have my root object, and then my sub pages. All of them have "Catalog List" selected as their "Application". But in my Catalog, I always see all the products, there are no filters applied ... I also see no errors, this is a bit confusing for me.