Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.adobe.cq.dam.cfm.impl.search.ContentFragmentReferencePublisherProvider retrieves last modified date also from jcr:created #19

Closed
kwin opened this issue Jul 2, 2024 · 1 comment
Milestone

Comments

@kwin
Copy link
Member

kwin commented Jul 2, 2024

The com.adobe.cq.dam.cfm.impl.search.ContentFragmentReferencePublisherProvider has the following logic

Calendar determineLastModified(ContentFragmentReferencePublishProvider.ResourceType type, Resource resource) {
		ValueMap props = resource.getValueMap();
		switch (type) {
			case ASSET :
				return (Calendar) props.get("jcr:content/jcr:lastModified",
						props.get("jcr:created", Calendar.getInstance()));
			case PAGE :
				return (Calendar) props.get("jcr:content/cq:lastModified",
						props.get("jcr:content/jcr:lastModified", props.get("jcr:created", Calendar.getInstance())));
			default :
				return (Calendar) props.get("jcr:lastModified", props.get("jcr:created", Calendar.getInstance()));
		}
	}

I.e. there is a fallback from cq:lastModified to jcr:lastModified to jcr:created. The latter is auto-generated via mixin mix:created which is part of the node type cq:PageContent.

@kwin
Copy link
Member Author

kwin commented Jul 2, 2024

Supporting this either requires adding parametrization support if jcr:created is considered for a particular pattern and type or jcr:created can always be considered (although currently not true for all ReferenceProvider implementations).

kwin added a commit that referenced this issue Jul 7, 2024
Consider creation date for Content Fragment Models
Consider auto-generated modified/created properties

This closes #22
This closes #19
kwin added a commit that referenced this issue Jul 7, 2024
Consider creation date for Content Fragment Models
Consider auto-generated modified/created properties

This closes #22
This closes #19
kwin added a commit that referenced this issue Jul 7, 2024
Consider creation date for Content Fragment Models
Consider auto-generated modified/created properties

This closes #22
This closes #19
kwin added a commit that referenced this issue Jul 7, 2024
Consider creation date for Content Fragment Models
Consider auto-generated modified/created properties

This closes #22
This closes #19
kwin added a commit that referenced this issue Jul 7, 2024
Consider creation date for Content Fragment Models
Consider auto-generated modified/created properties

This closes #22
This closes #19
kwin added a commit that referenced this issue Jul 7, 2024
Consider creation date for Content Fragment Models
Consider auto-generated modified/created properties

This closes #22
This closes #19
kwin added a commit that referenced this issue Jul 8, 2024
Consider creation date for Content Fragment Models
Consider auto-generated modified/created properties

This closes #22
This closes #19
@kwin kwin closed this as completed in b7ef26d Jul 8, 2024
@kwin kwin added this to the 1.4.0 milestone Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant