adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
733 stars 740 forks source link

[Content Fragments] Linked CF in Pages not showing in search results #1068

Closed juliaetate closed 4 years ago

juliaetate commented 4 years ago

Bug Report

Current Behavior Content Fragments and Content Fragments Lists included in pages from an overlaid Core component are not showing as pages in search results. When using the General Content Fragment component with the same content, page shows in search results.

Expected behavior/code Content Fragment content should be searchable on pages. If a Content Fragment contains a search term, the page it is on should appear in the Search Results list.

Environment

Possible Solution The General component adds a text node to the Content Fragment. When this node is added to the Core Content Fragment component, the text in this node becomes searchable.

Additional context / Screenshots I followed the OSGi configuration settings found in the Adobe docs (https://docs.adobe.com/content/help/en/experience-manager-65/developing/extending-aem/content-fragments-config-components-rendering.html#osgi-service-content-fragment-component-configuration) for my overlaid components even though that shouldn't be required. I did notice that the initial settings for the Core component listed the element property and elementName when the actual property appears to be elementNames. Changing this had no effect.

msagolj commented 4 years ago

@juliaetate thank you for your feedback. I tried to reproduce your issue but for me it seems to work:

see also contentfragment_text.zip for a recording of above steps.

We also have an internal IT test that creates a proxy from the Core Content Fragment Component, puts it on a page and afterwards checks if it the corresponding page gets found and the test passes.

So as long as you proxy from core/wcm/components/contentfragment/v1/contentfragment everything should work. Maybe i missed/missunderstood something ?

Also by General Content Fragment i assume you are referring to the non core component version of the content fragment, correct ?

juliaetate commented 4 years ago

After updating to the latest version of this repo, I noticed that my issue is possibly related to the depth of the content fragment.

One of my templates has a main layout container with an additional layout container inside of it, and when I put content in there, it will show in search results. Another template has the main layout container with an additional layout container in that. Inside of the second layout container, I have yet another layout container. Any content in the 3rd layout container will not show in my search results. Is there a way around this limit?

juliaetate commented 4 years ago

I've solved my issue with the nested fragments. Thanks for the video walkthrough and looking into this.

juliaetate commented 4 years ago

I've gone back over this because my Content Fragment List is not serachable, even after fixing the Content Fragment.

I fixed the issue with the Content Fragment text node by using the slingResourceType core/wcm/extension/components/contentfragment/v1/contentfragment, not core/wcm/components/contentfragment/v1/contentfragment. When I've tried creating a component with the slingResourceType of core/wcm/components/contentfragment/v1/contentfragment, I do NOT get the text node and my content is not searchable.

Attached are pictures showing the Content Fragment List node properties in use on a page.

What can I do to get the Content Fragment List content to be searchable?

AEM 6.5.4.0, Core 2.10.0

image image

juliaetate commented 4 years ago

@msagolj Is there any way to make Content Fragment Lists content searchable?

blair-robertson commented 4 years ago

Hello, did you find the solution to this? We are having the same problem with the Content Fragment component not being searchable.

Env to reproduce:

Problem: When we add a content fragment to a page in our project the content within the fragment is not available in a full text search (via Querybuilder).

Our problem appears to be because a property named text is not updated with the content from the Content Fragment on save. If I change the component resource type to the foundation dam/cfm/components/contentfragment and select a content fragment, then the text property is populated.

Steps to reproduce:

  1. In Sites, go to /sites.html/content/wknd/language-masters/en/magazine
  2. Create Page > Article Page
  3. Edit the Content Fragment component.
    • Select a CF: /content/dam/wknd/en/magazine/fly-fishing-amazon/fly-fishing
    • Display mode : Single
    • Element: Main
    • Variation: Master
    • Close dialog
  4. In CRXDE navigate to the content fragment component: /content/wknd/language-masters/en/magazine/article-page/jcr:content/root/container/container/contentfragment
    • text property (which is created by Article template) is empty

We have the exact same problem with our projects Content Fragment Component that is proxying the Core Components CF component.

Thanks!

jckautzmann commented 4 years ago

@blair-robertson I asked the team owning the Content Fragment logic (that is provided by AEM) to chime into this discussion.

juliaetate commented 4 years ago

@blair-robertson I came across a core components extension 1.0.12 which applies the text node to the Content Fragments when installed in addition to the Core bundle. I don't 100% remember how I found it, but I would love a solution to Content Fragments and Content Fragment List searchability that doesn't require an old add-on.

Unfortunately, my Content Fragment Lists still do not show in search results.

jckautzmann commented 4 years ago

Adobe internal reference: CQ-4303683

gabrielwalt commented 4 years ago

This seems to have been fixed.

blair-robertson commented 4 years ago

Hi @gabrielwalt, unfortunately the fix supplied via Adobe Support didn't work and the ticket is still under progress.