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

#12716 Update version_ts for all page versions. Refresh all page vers… #13076

Merged
merged 5 commits into from
Nov 17, 2017

Conversation

dsilvam
Copy link
Contributor

@dsilvam dsilvam commented Nov 16, 2017

…ions from cache.

private static void updateHTMLPageVersionTS(String id) throws DotDataException, DotSecurityException {
Identifier identifier = APILocator.getIdentifierAPI().find(id);
List<Contentlet> allContentletVersions = APILocator.getContentletAPI()
.findAllVersions(identifier, APILocator.getUserAPI().getSystemUser(), false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't the right method - this pulls all old versions of a piece of content which can be in the 100's . We need to pull a list of ContentletVersionInfos for a given piece of content

@dotCMS dotCMS deleted a comment Nov 17, 2017
@dotCMS dotCMS deleted a comment Nov 17, 2017
@Override
protected List<ContentletVersionInfo> findAllContentletVersionInfos(final String identifier)throws DotDataException, DotStateException {

HibernateUtil dh = new HibernateUtil(ContentletVersionInfo.class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure but shouldn't include cache here? if not apply nvm my comment

.findContentletByIdentifier(ident.getId(), false, languageId, APILocator.systemUser(), false);
IHTMLPage htmlPage = APILocator.getHTMLPageAssetAPI().fromContentlet(content);
PageServices.invalidateAll(htmlPage);
List<Contentlet> cons = APILocator.getContentletAPIImpl().findContentlets(Lists.newArrayList(inodes));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename it to contenlets or contentList

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@dsilvam dsilvam merged commit 1084052 into master Nov 17, 2017
@dsilvam dsilvam deleted the issue-12716-refresh-all-page-versions branch November 17, 2017 20:50
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

Successfully merging this pull request may close these issues.

3 participants