Code

#20130 closed Bug (fixed)

cache tag doesn't resolve fragment name

Reported by: FunkyBob Owned by: bmispelon
Component: Template system Version: master
Severity: Release blocker Keywords:
Cc: bmispelon@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

All arguments passed to the CacheNode are run through parser.compile_filter, but when building the cache key, fragment_name is not resolved.

This works because FilterExpression.str returns self.token... however, creating the filter expression is a waste of work if we're not going to use it.

The fix is either to not call compile_filter on this argument, OR to call resolve on fragment_name before using it.

Attachments (0)

Change History (6)

comment:1 Changed 13 months ago by FunkyBob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 13 months ago by russellm

  • Severity changed from Normal to Release blocker
  • Triage Stage changed from Unreviewed to Accepted
  • Version changed from 1.5 to master

This appears to be a regression in the handling of the fragment name.

comment:3 Changed 13 months ago by bmispelon

  • Cc bmispelon@… added
  • Owner changed from nobody to bmispelon
  • Status changed from new to assigned

comment:4 Changed 13 months ago by bmispelon

  • Has patch set

comment:5 Changed 13 months ago by bmispelon

I updated the PR to add a regression test.

comment:6 Changed 13 months ago by Florian Apolloner <florian@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In 5080311998a8ecc5b3f9fa162c19e55b70aa9f85:

Fixed #20130 -- Regression in {% cache %} template tag.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.