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

TV value for resource inefective in [[snippet@ps]] #10483

Closed
gadamiak opened this Issue Aug 19, 2010 · 8 comments

Comments

Projects
None yet
2 participants
@gadamiak

gadamiak commented Aug 19, 2010

gadamiak created Redmine issue ID 10483

In property set for getResources "myps" I defined "[ [_mytv] ]" value for "resources". When the snippet is called with "[ [getResources@myps] ]" the value of "mytv" is not used. I have to use a direct call "[[getResources@myps?resources=[ [_mytv] ]]]". I'm not sure whether it's issue with PS in general or getResources?

@gadamiak

This comment has been minimized.

gadamiak commented Nov 3, 2010

gadamiak submitted:

This is still present in 2.0.5-dev. I tested the following values in a property set to no avail:

  • [[*mytv]]
  • [[+mytv]]
  • *mytv
  • +mytv
  • mytv

The actual name ot the TV in case contains a dot and a dash: my.t-v

@opengeek

This comment has been minimized.

Member

opengeek commented Nov 3, 2010

opengeek submitted:

The current parsing rules for properties work like this when an Element is processed via a tag:

  • the tag string is processed, including non-cacheable embedded tags
  • the parsed property values from the tag string are merged on top of any PropertySet properties, which is merged on top of the default properties
  • the Element content is processed to produce output

So currently, the only way you can get tags into the Element that are not parsed before the Element is, is by putting them in PropertySets (or default properties). And likewise, the only way to have tags parsed before the Element is, is by putting them in the tag string directly. We could fix the "bug" to make it consistent by pre-parsing all default and PropertySet properties before the Element is, but then you would have no way to get tags in that were not pre-processed. Perhaps we could make this a piece of Element metadata which optionally instructed the Element to pre-process all tags in the property values from default properties and Property Sets.

@gadamiak

This comment has been minimized.

gadamiak commented Nov 3, 2010

gadamiak submitted:

I'm not sure I'm getting you right that it's by design? If so, maybe the "uncached trick" could be used to force pre-processing of property? I mean using [[!*tv]] as property value or something similar?

@opengeek

This comment has been minimized.

Member

opengeek commented Mar 21, 2011

opengeek submitted:

I have no solution for this at the time. Pre-processing tags in property set values would break current Elements that expect the current behavior, i.e. the tags to not be processed before being passed to the Element.

Suggestions welcome...

@gadamiak

This comment has been minimized.

gadamiak commented Mar 22, 2011

gadamiak submitted:

Jason Coward wrote:

...Perhaps we could make this a piece of Element metadata which optionally instructed the Element to pre-process all tags in the property values from default properties and Property Sets.

What about that idea?

@opengeek

This comment has been minimized.

Member

opengeek commented Mar 22, 2011

opengeek submitted:

Ah right, forgot about that — It's still on the table for 2.2.x, I am just afraid that it would not be understood by many users who would turn it on in places that would cause Snippets to seem broken. There are potentially other implications to that as well, affecting output filters and other processing, so I'm not going to rush this into 2.1 which we need to release soon.

@gadamiak

This comment has been minimized.

gadamiak commented Mar 22, 2011

gadamiak submitted:

Right. An informative description will be a must.

@opengeek

This comment has been minimized.

Member

opengeek commented Nov 12, 2011

opengeek submitted:

Mostly fixed; currently checkbox on the properties tab does not trigger the form as dirty.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment