Skip to content

Return only published entries from template lookups by anchor (6.1.x) - #380

Open
snoopdave wants to merge 1 commit into
merge-6.1.8-rc2-into-6.1.xfrom
template-entry-lookup-published-6.1.x
Open

snoopdave wants to merge 1 commit into
merge-6.1.8-rc2-into-6.1.xfrom
template-entry-lookup-published-6.1.x

Conversation

@snoopdave

Copy link
Copy Markdown
Contributor

Templates could read draft, pending and scheduled entries with getWeblogEntry(anchor), including on other weblogs reached through $site on an aggregated front page.

  • WeblogWrapper.getWeblogEntry(anchor) now returns null unless the entry is published. No bundled theme calls it; permalink and preview pages use the manager directly and are unchanged.
  • New WeblogWrapperEntryLookupTest (fails without the change). Full suite on JDK 11: 850 tests, 0 failures.
  • CHANGES.md entry under 6.1.8 behaviour changes. Based on Bring roller-6.1.x up to the 6.1.8 RC2 tag #377; I'll retarget to roller-6.1.x after it merges. For 6.1.8 RC3.

A custom template could read draft, pending and scheduled entries through
$weblog.getWeblogEntry(anchor), including on weblogs reached through $site.
Templates now get null for anything not published. No bundled theme uses
the call.

@mraible mraible left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same change as #382; looks good. CI will run once this is retargeted to roller-6.1.x.

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.

2 participants