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

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

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

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

gadamiak opened this issue Aug 19, 2010 · 8 comments
Labels
area-core bug The issue in the code or project, which should be addressed.

Comments

@gadamiak
Copy link

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
Copy link
Author

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
Copy link
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
Copy link
Author

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
Copy link
Member

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
Copy link
Author

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
Copy link
Member

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
Copy link
Author

gadamiak submitted:

Right. An informative description will be a must.

@opengeek
Copy link
Member

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
Labels
area-core bug The issue in the code or project, which should be addressed.
Projects
None yet
Development

No branches or pull requests

2 participants