Details
-
Bug
-
Resolution: Invalid
-
Medium
-
4.7 Maintenance
-
None
-
eZ Publish 4.7 fully patched.
Description
Steps to reproduce:
1. Create a view full of the existing "product" class on main frontend siteaccess - "eng" in my tests:
[full_product] Source=node/view/full.tpl MatchFile=full/product.tpl Subdir=templates Match[class_identifier]=product
2. Create a new content class:
Name: Recipe
Identifier: recipe
Container: No
Add two attributes:
Attribute Type: Text line
- Name: Title
- Identifier: title
- Is required: checked
Attribute Type: Object relations
- Name: Product
- Identifier: product
- Selection method: browse
- Allowed classes: product
3. In product.tpl template, display all reverse related objects of "recipe" type:
{def $objects=fetch( 'content', 'reverse_related_objects', hash( 'object_id', $node.object.id, 'attribute_identifier', '295' ) )} {foreach $objects as $object} {$object.name|wash} <br /> {/foreach}
Here, '295' is the id of the "product" attribute of the "recipe" class defined in step 2. Please change it to reflect the id of your "product" attribute.
4. Configure viewcache.ini.append.php:
[ViewCacheSettings] SmartCacheClear=enabled [recipe] DependentClassIdentifier[]=folder DependentClassIdentifier[]=landing_page ClearCacheMethod[]=object ClearCacheMethod[]=parent ClearCacheMethod[]=relating
5. Create a new object in content tree of type "product". Called it "Product 1";
6. Create a new object in content tree for the new "recipe" class in the content tree. Called it "Recipe 1" and on the "product" field selected "Product 1";
7. Go, on the frontend siteaccess, to the "Product 1" page. "Recipe 1" should be listed there, but it's not;
Workaround:
8. Go back to admin interface, edit "Recipe 1" and publish (no content modifications required, just edit and publish);
9. Go to frontend, and refresh (F5) "Product 1" page. "Recipe 1" is now listed.