Opened 7 years ago

Closed 5 years ago

Last modified 4 years ago

#9666 closed (fixed)

ssi tag don't works with context variables

Reported by: andrews Owned by: ericholscher
Component: Template system Version: master
Severity: Keywords: tag, ssi, template
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: UI/UX:

Description

if I want use this:

{% ssi url %}


and url to be a context variable, this don't works. The tag {% ssi %} works only with strings.

Attachments (5)

patche.txt (527 bytes) - added by andrews 7 years ago.
ssi-variable.diff (1.2 KB) - added by UloPe 6 years ago.
fixed ssi variable resolving
9666-with-tests.2.diff (5.3 KB) - added by ericholscher 6 years ago.
'"' +This makes me cry a little inside + '"'
9666-with-tests.diff (5.6 KB) - added by ericholscher 6 years ago.
Actually attach template this time.
future_ssi-1.diff (4.2 KB) - added by seanbrant 5 years ago.
future ssi tag replacement

Download all attachments as: .zip

Change History (16)

Changed 7 years ago by andrews

comment:1 Changed 7 years ago by andrews

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Version changed from 1.0 to SVN

comment:2 Changed 6 years ago by jacob

  • milestone set to 1.1
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 6 years ago by UloPe

The above patch has a bug if the ssi tag is used with a variable inside a loop.
Since the variable is only "resolved" once subsequent .render() calls (to the same node) always return the result of the first invocation.

I'll attach a fixed patch.

Changed 6 years ago by UloPe

fixed ssi variable resolving

comment:4 Changed 6 years ago by mcroydon

  • Needs tests set

comment:5 Changed 6 years ago by ericholscher

  • Owner changed from nobody to ericholscher
  • Status changed from new to assigned

Note that currently I don't see any tests associated with ssi. I'll work on this later, if nobody else wants to.

Changed 6 years ago by ericholscher

'"' +This makes me cry a little inside + '"'

Changed 6 years ago by ericholscher

Actually attach template this time.

comment:6 Changed 6 years ago by russellm

  • milestone 1.1 deleted

This borders on being a feature; deferring from v1.1

comment:7 Changed 5 years ago by ericholscher

  • milestone set to 1.3

Changed 5 years ago by seanbrant

future ssi tag replacement

comment:8 Changed 5 years ago by seanbrant

#14389 is trying to introduce a from future concept for the url tag fixes. My latest patch does the same thing for the ssi tag. See #14389 for more details.

comment:9 Changed 5 years ago by russellm

The RC1 patch on #14389 includes a fix for this ticket.

comment:10 Changed 5 years ago by russellm

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

(In [14643]) Fixed #14389, #9666 -- Started the migration path to make the first argument to url and ssi template tags syntactically consistent with other tags. Thanks to Sean Brant for the draft patch.

comment:11 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top