-
1. Re: Bug List thread
Liam Dilley Jul 8, 2014 7:29 PM (in response to Liam Dilley)Question:
Supported filters and Operators.
Back when I documented this to Marius
The BC render has only half of the available liquid filters
http://docs.shopify.com/themes/liquid-basics/output
Are you guys able to include these?
-
2. Re: Bug List thread
Liam Dilley Jul 8, 2014 7:41 PM (in response to Liam Dilley)Bug: Editor
1. Web app modules inside table rows (if you were to have items render in td layout) gets pulled out of the table.
2. Image resize in edtior:
Loving the idea to on scale down use the thumbnail parameter to render the image when scaled - AWESOME. But it just seems a bit bugy and has div with css wrapping it also doing CSS scaling. IF you guys can get it to just (on scale) paramater up the image with the thumbnail rendering - AWESOME!
3. Thumbnail parameter on images does not seem to work on the beta server.
4. You can not insert a module into html mode
5. I do not know how and what the exact case is for this but sometimes a module is wrapped in a random div when you insert it.
-
3. Re: Bug List thread
Robert Bell (Bosweb) Jul 8, 2014 7:55 PM (in response to Liam Dilley)If a product does not have a price entered, having the system code render should not be the default output.
Looks like the shortest way around that is with a conditional:
{% if this.mightNotExist %} {{ this.mightNotExist }} {% endif %}I think the current behaviour is expected; null/empty output should not fail silently.
(too bad the filters also choke on nonexistent tags;
{{ this.mightNotExist | append: "" }}would have been a tidy solution) -
4. Re: Bug List thread
Liam Dilley Jul 8, 2014 8:40 PM (in response to Robert Bell (Bosweb))Includes do not seem to be working at the moment - I have tried the following outputs:
{%include"/_System/Includes/footer.html"%}
{% include"/_System/Includes/footer.html" %}
{% include /_System/Includes/footer.html %}
{%include /_System/Includes/footer.html %}
{%include ="/_System/Includes/footer.html" %}
{% include"/_System/Includes/footer.tpl" %}
There is no raw output but just nothing is rendering out. This was working in the old version of liquid and an important feature to get working again please.
-
5. Re: Bug List thread
Liam Dilley Jul 8, 2014 8:44 PM (in response to Robert Bell (Bosweb))Yeah Rob,
I worked out you can do your own conditional but I do not like this principle of if something is blank BC just dups the system code out. Bit silly
-
6. Re: Bug List thread
Liam Dilley Jul 8, 2014 9:03 PM (in response to Liam Dilley)Bug:
Sectioning renders raw output (not just blank) and does not appear to be working
Code example:
{% section name="head"%}
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
{% endsection %}
-
7. Re: Bug List thread
Liam Dilley Jul 8, 2014 9:29 PM (in response to Liam Dilley)Render issue?
This one does not seem to work:
{{ 'image-name.gif' | asset_url | img_tag }}
And this does not:
{{ "this.largeImageUrl" | asset_url | img_tag }}
The result render is -
'image-name.gif
AND
/images/file.jpg
So it renders the raw data but not an image tag as expected.
-
8. Re: Bug List thread
Liam Dilley Jul 8, 2014 9:41 PM (in response to Liam Dilley)Bug: CSS asset_url not rendering
This does not work:
{{ 'shop.css' | asset_url | stylesheet_tag }}This one for a js file does work though:{{ 'shop.js' | asset_url | script_tag }} -
9. Re: Bug List thread
Liam Dilley Jul 8, 2014 10:08 PM (in response to Liam Dilley)Render issue?
{{ this.custom1 | default: "HELLO THERE" }}
Does not output, this would be handy.
-
10. Re: Bug List thread
Liam Dilley Jul 9, 2014 3:01 AM (in response to Liam Dilley)Product preview and other similar preview elements in the admin when liquid is used do not render.
If it is hard for preview to render stuff with liquid I would suggest maybe just jumping to the thing on the live site in all cases. I think I mentioned this in first Liquid iteration.
-
11. Re: Bug List thread
Lucian Cozma Jul 9, 2014 3:34 AM (in response to Liam Dilley)If a product price for the country product is not set, this is the correct behavior (the price is not generated and if a given tag is not set then liquid leaves the tags not replaced- so it's resier for a developer to debug rather than rendering empty string).
-Lucian
-
12. Re: Bug List thread
Liam Dilley Jul 9, 2014 3:39 AM (in response to Lucian Cozma)Hi Lucian, But you need to consider live sites and when clients do not do a price right.
They forget to do something or do a price in error then the tag shows, and if a bot happens to show up to the site it indexes those tags rather then the prices. We have seen this with the current tag implementation. I was just hoping with the new renderer we can avoid this.
-
13. Re: Bug List thread
Lucian Cozma Jul 9, 2014 3:41 AM (in response to Liam Dilley)Regarding filters that liquid will support.
Yes, we do plan to add support for more filters. For example, the "default" filter is one that it's already on the "TODO" list.
The plan is first to focus on the filters that are essential to implementing functionality (formatting, math, parameter manipulation, etc), so most likely convenience filters (like asset_url, stylesheet_tag, etc) will not be high on the priority list (also, some of the filters are shopify-oriented).
Also, the include tag is not supported, we are looking at it to see if we will support it (but not decided yet).
We will enhance liquid a lot to make sure that we get the maximum benefit from having it as a templating engine, so thank you guys, keep the feedback coming!
-Lucian
-
14. Re: Bug List thread
Lucian Cozma Jul 9, 2014 3:46 AM (in response to Liam Dilley)I understand your point. We were torn last time when we decided to do this implementation and this is why then we asked you guys (the partners) how to do it.
The feedback then was to go with this behavior as it would allow you the best of both worlds: you can both debug easily if you misspelled a tag or if something is not properly set and also allows you guys to place conditionals to verify if something is set and display or not.
Maybe with the arrival of the "default" filter things will be also easier to handle {{this.salePrice | default : ""}}
-Lucian
-
15. Re: Bug List thread
Lucian Cozma Jul 9, 2014 3:57 AM (in response to Liam Dilley){% section name="head" %} is not supported in this liquid implementation.
-Lucian
-
16. Re: Bug List thread
Liam Dilley Jul 9, 2014 4:07 AM (in response to Lucian Cozma)Thanks for the update on the filters. But script works and stylesheet did not so there is some inconstancy there. IF group type such as date does not work, as it does - Ok got you, but if another set you have some work but others do not. It is hard to know if its just bugged or something else from my end.
It would be good to have the date stuff, I would use this a lot.
-
17. Re: Bug List thread
Liam Dilley Jul 9, 2014 4:09 AM (in response to Lucian Cozma)Default filter would solve a lot of problems and also offer a lot of options Lucian - Documentation wise, highly suggesting good use of this I think would be quite key to good implementations of liquid.
I will try talk to Mihai about maybe having a best practise? Section on the updated docs to outline things like this. It would save a lot of support "This does this, why?" Stuff.
-
18. Re: Bug List thread
Liam Dilley Jul 9, 2014 4:10 AM (in response to Lucian Cozma)Any idea on include stuff Lucian? Just not working yet?
-
19. Re: Bug List thread
Lucian Cozma Jul 9, 2014 4:18 AM (in response to Liam Dilley)Date filter already works for output (does not work yet for asignment - to be fixed in next release).
Try in the webapp list layout this: {{this.releaseDate | date:"dddd dd-MMMM-yyyy"}}. Should work no problem, the only thing is that the date formatting syntax will be from .NET : Custom Date and Time Format Strings
-Lucian
-
20. Re: Bug List thread
Liam Dilley Jul 9, 2014 5:18 AM (in response to Lucian Cozma)Hey Lucian,
You have this in the beta template:
{% if global.user.isLoggedIn == 'true' %}
<li>{module_logout}</li>
{% endif -%}
This currently does not work. For me it looks like since {{global.user.isLoggedIn}} does not work, currently anything global. is not working at the moment?
-
21. Re: Bug List thread
Lucian Cozma Jul 9, 2014 5:28 AM (in response to Liam Dilley)No, it's a bug in the beta template. Should be "globals" instead of "global" all over.
That's the problem.
Thanks,
-Lucian
-
22. Re: Bug List thread
Liam Dilley Jul 9, 2014 5:51 AM (in response to Lucian Cozma)Ahh awesome, that was it.
Ignore my email as well
-
23. Re: Bug List thread
cristinel@adobe Jul 10, 2014 1:32 AM (in response to Liam Dilley)This looks like a bug/miss. We will be looking at that.
Cristinel
-
24. Re: Bug List thread
cristinel@adobe Jul 10, 2014 1:39 AM (in response to Liam Dilley)Hi Liam,
- Do you have a sample code for web apps inside a table - I've done done some testing on my own and cannot reproduce;
- Image resize - glad you like that; the div wrapping cannot be reproduced; can you send or attach a sample page content
- Thumbnail parameter - this looks like a bug as sometimes it works sometimes not; might not be related to liquid but to the .NET upgrade
- Insert module - good catch, will fix
- Like in the images case, a sample code would actually help isolate and reproduce the problem; Usually, all the in-browser editor rely heavily on the content editable browser features and these behave differently on various browsers. Editor developer usually develop custom code for consistent behaviour.
Cristinel
-
25. Re: Bug List thread
Liam Dilley Jul 10, 2014 4:37 PM (in response to cristinel@adobe)Hi Cristinel,
Editor on pages in latest firefox on mac...
- I just tried it again and actually did not have the div show up for the images, but I did have some other odd behaviour happen:
image_edit - Pretty-Liam's library
- I can no longer replicate the table web app issue
-
26. Re: Bug List thread
cristinel@adobe Jul 11, 2014 1:34 AM (in response to Liam Dilley)Thanks for the video. We'll look into it.
Cristinel
-
27. Re: Bug List thread
Liam Dilley Jul 28, 2014 8:43 PM (in response to cristinel@adobe)Render Issue:
json module.
Issue: You can not have a paramater based url in the JSON source, it will only render with .json, are you guys able to address this at all?
{module_json,json="/data.json?param=123" template="/_System/CustomLayouts/datafeed.tpl"}
-
28. Re: Bug List thread
Liam Dilley Jul 28, 2014 8:44 PM (in response to Liam Dilley)Further JSON data source question:
Are you able to not just have .json files, can you parse JSON rendered Data urls such as the following?
https://www.facebook.com/feeds/page.php?id=234655043214510&format=json&callback=?
-
29. Re: Bug List thread
Liam Dilley Jul 28, 2014 9:04 PM (in response to Liam Dilley)Bug?
Where: For loop
Issue: limit:5 offset:2 use on the for loop does work, but sometimes when you load the page, the for liquid tag just renders, Refreshing the page will fix it but randomly it wont.
-
30. Re: Bug List thread
Liam Dilley Jul 28, 2014 9:24 PM (in response to Liam Dilley)Sorry for lots of posts but the forums wont let you edit - Keeps saying I am not logged in.
Update on json module:
The following also will not work.
{module_json,json="http://www.yoursite.com./somedata.json" template="/_System/CustomLayouts/datafeed.tpl"}
So your not allowing external json data at all or this is not working.
-
31. Re: Bug List thread
Liam Dilley Jul 29, 2014 1:20 AM (in response to Liam Dilley)Liquid web app custom field tag bug.
If you have a web app custom field named "Intro Text" and you try to render it there is an issue.
{{this}} on a web app item list will reveal the target data for the web app. For this custom field the name is as follows and gives the following:
[Intro Text, Eu mei lorem probatus. Diceret molestiae at sed. Ne pro erant quando quodsi, vim affert blandit ullamcorper at. Ad impedit facilis pro. Nullam phaedrum per cu, possim discere recteque ad sit.]
Another Custom field is as follows:
[Image, <a href="/news/ad-impedit-facilis"><img border="0" alt="" src="/burgundy_01.jpg"></a>]
[Image_nolink, <img border="0" alt="" src="/burgundy_01.jpg">]
[Image_value, /burgundy_01.jpg]
To get the image you can do the following:
{{this.image}}
{{this.Image}}
{{this.Image_nolink}}
{{this.Image_value}}
These all render.
BUT
If you do:
{{this.Intro Text}} Or {{this.intro text}} or {{this.intro_text}}
None of these will render.
Issue with current liquid render:
One thing with the current liquid data render for web apps is that it is basically a carbon copy of the tags currently. If this is staying as is it would be a bit of a shame as I hoped we would have direct access to data a bit more.
For a custom data field it renders:
[Author_id, 4815023]
[Author, <a href="/staff/john-smith">John Smith</a>]
I was hoping that these would be true objects so you could be doing..
{{this,author.id}} and {{this.author.text}} and {{this.author.url}}
And for an image:
{{this.customimage.value}}
Will this not be something that is happening with the liquid rendering engine from BC?
-
32. Re: Bug List thread
Liam Dilley Jul 29, 2014 1:49 AM (in response to Liam Dilley)Bug with Web app collection:
This is a web app item via {{this}} inside a template or custom template for a web app item:
[itemid, 4815164]
[name, Ad impedit facilis]
[urlWithHost, http://pretty-alpha.businesscatalyst.com/news/ad-impedit-facilis]
[url, /news/ad-impedit-facilis]
[releaseDate, 2014-07-29]
[expiryDate, 9999-01-01]
[lastUpdateDate, 2014-07-29]
[counter, 1]
[weight, ]
[commentCount, 0]
[editUrl, /news/ad-impedit-facilis?A=Edit]
[isCustomerModule, False]
[editParams, ]
[edit, ]
[deleteUrl, /CustomContentProcess.aspx?CCID=21555&OID=4815164&A=Delete]
[deleteParams, ]
[delete, ]
[Image, <a href="/news/ad-impedit-facilis"><img border="0" alt="" src="/burgundy_01.jpg"></a>]
[Image_nolink, <img border="0" alt="" src="/burgundy_01.jpg">]
[Image_value, /burgundy_01.jpg]
[Intro Text, Eu mei lorem probatus. Diceret molestiae at sed. Ne pro erant quando quodsi, vim affert blandit ullamcorper at. Ad impedit facilis pro. Nullam phaedrum per cu, possim discere recteque ad sit.]
[Author_id, 4815023]
[Author, <a href="/staff/john-smith">John Smith</a>]
[globals, System.Collections.Generic.Dictionary`2[System.String,System.Object]]
If you do a web app as a collection like this:
{module_webapps,News,a,,,,,8,,1 template="" collection="newslist"}
<div class="liquid-news">
{% for item in this.newslist.items -%}
ETC
{{item}} Renders:
[itemid, 4815164]
[name, Ad impedit facilis]
[urlWithHost, http://pretty-alpha.businesscatalyst.com/news/ad-impedit-facilis]
[url, /news/ad-impedit-facilis]
[releaseDate, 2014-07-29]
[releaseDate_raw, 29/07/2014 12:00:00 AM]
[expiryDate, 9999-01-01]
[expiryDate_raw, 1/01/9999 12:00:00 AM]
[lastUpdateDate, 2014-07-29]
[lastUpdateDate_raw, 29/07/2014 6:22:39 PM]
[counter, 1]
[weight, ]
[Intro Text, Eu mei lorem probatus. Diceret molestiae at sed. Ne pro erant quando quodsi, vim affert blandit ullamcorper at. Ad impedit facilis pro. Nullam phaedrum per cu, possim discere recteque ad sit.]
[Author_id, 4815023]
[Author, <a href="/staff/john-smith">John Smith</a>]
You can see that the custom image fields are missing from the data output so you can not use them.
-
33. Re: Bug List thread
Radu Iulian Jul 31, 2014 4:20 AM (in response to Liam Dilley)Hello,
here are some answers:
1. {module_json,json="/data.json?param=123" template="/_System/CustomLayouts/datafeed.tpl"}
The current implementation is limited to static files. In theory we could accept arbitrary json files there, but there's a catch: the page render latency will be much higher and we'll expose our system to a new class of denial of service attacks. A security aware implementation is not trivial and will have to be prioritized.
2.Are you able to not just have .json files, can you parse JSON rendered Data urls such as the following?
This is exactly like the first point. It doesn't work yet, we can do that but need to be careful not to shoot ourselves in the foot from a security/reliability point of view. I can see the uses though. It looks like a step in the right direction and it will augment the power of module_json.
3. Bug? Where: For loop
Will need to investigate this. If it's occuring randomly it's most likely a caching bug or a server that wasn't functioning properly. This will not happen in the live environment.
4. The following also will not work.{module_json,json="http://www.yoursite.com./somedata.json" template="/_System/CustomLayouts/datafeed.tpl"}
This is not working for the same reason 1 and 2 aren't working.
5. {{this.Intro Text}} Or {{this.intro text}} or {{this.intro_text}} aren't working
The correct syntax is {{this["intro Text"]}}. Since these are custom fields we can't control the variable names. The index approach works out of the box. If needed, we can come up with a normalization algorithm that will convert the spaces and invalid characters to something else, but this can be avoided with the index syntax or with a field rename.
6. I was hoping that these would be true objects so you could be doing..{{this,author.id}} and {{this.author.text}} and {{this.author.url}}
This is indeed a very reasonable expectation. I would like us to do that too. There was and there still is a lot of work to be done for the migration to the Liquid templating engine and we didn't have the time to name everything correctly. I can't promise you this will happen, but I hope we'll have some time at the end to take a step back and do a sweep over the whole code and name things properly. It would help us a lot if you can identify places where data is missing or should be exposed in a different way. Your feedback is appreciated.
7. You can see that the custom image fields are missing from the data output so you can not use them.
This is a bug and will be fixed.
-
34. Re: Bug List thread
Liam Dilley Jul 31, 2014 4:55 AM (in response to Radu Iulian)Hi Radu.
Json stuff:
I have moved all requests in another thread so things are less cluttered for you guys, but the current JSON is actually very limited and I can not see it being used that much in its current form.
The module json is a great concept, but to read a static JSON file or one that can only really be updated by some API/FTP upload method has some use, but limited and has to have some other 3rd party means to create the content.
A module collection as json can be useful for javascript use but useless for any liquid use because you would just use the raw data anyway.
The big main uses you would vision where you have the json of events as a .json you could render and run linking association with say a web app at the moment would involve making a page but will be .html with the json paramater where say the module_json wont read because it is not json.
I understand the concerns about the external JSON access but considering all the viable uses for it that you can do with javascript now, It should not be an issue? Most require authentication and key in the url or registering your url or having account their end. If needed you could have a section in the admin which is simply the partner white listing urls?
5.
If you run the {{this}} it outputs custom fields with spaces, you just can not pull them that way. Someone doing so would do as I do. If documentation is updated advising you of the way you told me to use it, this could be missed. If you could run a pass to replace spaces with _ for example and {{this.custom_field}} is the render and {{this}} shows custom fields in that format, I think it would follow the ethos being outline for BC.Next with things like named parameters to make things make more sense etc. I can see other systems with custom data lowercasing the item names and underscoring spaces.
6. I will try and list as I find them for you, but in my requests thread I direct to all the comments there where Alexandru asked people to comment on missing tags for data in BC. There is a lot of comments for those already.
7. Thanks.
Not much documentation and you guys are still working on things, SO I am just calling things as I see them and providing thoughts. How we are doing things at Pretty is me trying things and between me and Brett we are posing real use cases we need to work. Brett has gone "If that does this, then I would want to be doing this for clients" etc.
-------------------
In terms of JSON to help give you an insight of what I was doing was:
I actually skipped trying to do a local .json file, documentation did not really say you can ONLY do that. The first thing of what we are asked often by clients is facebook feed. So I went to our json facebook feed and tried to link it. This did not work so I then tried a local one to get it working.
I then went to see how the | json worked on collections and while it works which is cool, considering you actually using liquid, I did not and still not finding much use for it. Yep I would do that for some dynamic content manipulation but I actually would be seeking some more pure JSON options to use with liquid and my client side code.
-
35. Re: Bug List thread
Radu Iulian Jul 31, 2014 5:16 AM (in response to Liam Dilley)I see | json as a realiable self generated documentation. It doesn't replace the actual documentation, but it will never be out of date and can improve developer productivity.
My main concern about the external JSON files is that they are opening a lot of security holes.
There are two classes of attacks I'm thinking of. One type of attack is easy to be implemented (by attackers) and somebody can bring down the whole BC with an off-the-shelf computer. The other attack is more theoretical.
A trivial implementation can be written relatively fast, but a good implementation that avoids the security issues is costlier from a development point of view.
-
36. Re: Bug List thread
Liam Dilley Aug 26, 2014 11:54 PM (in response to Liam Dilley)This appears to be broken or re-broken:
{module_webapps id="22155" hideEmptyMessage="true" param1="{{this.name}}" filter="all" }
This will cause the output to be:
Doomsday T-Shirt" filter="all" }
Also does not work with passed variable values now as well.
-
37. Re: Bug List thread
Liam Dilley Sep 29, 2014 7:41 PM (in response to Liam Dilley)We will still need a solution for custom fields in web apps with spaces as these will not render yet in liquid
-
38. Re: Bug List thread
Liam Dilley Oct 2, 2014 6:14 PM (in response to Liam Dilley)Found a couple of bugs:
Liquid - Shopping Cart:
{{productGrandTotal}}
{% if productGrandTotal >= 100 %}
<div class="alert alert-success" role="alert">
Thank you for looking to spend more then $100.00 with us. As a thank you please use this 5% off discount code: <strong>SpecialDiscount</strong>
</div>
{% endif %}
If the price is 150.50 etc - This shows.
If the grand total is 75 - This still shows.
It does not seem to be running the operator properly.Also...
{{productGrandTotal}}
{% if productGrandTotal >= 100.00 %}
<div class="alert alert-success" role="alert">
Thank you for looking to spend more then $100.00 with us. As a thank you please use this 5% off discount code: <strong>SpecialDiscount</strong>
</div>
{% endif %}
It does not like the decimal places on the value, it looks like it only handles integers. This may be an issue if people wish to run more detailed pricing options?
{{productGrandTotal}} also can render to 3 decimal places. Not sure if this is intentional or not.
Side note: Would have to have some self refresh overrides as of course it is liquid so if added to cart this offer would still show.
-
39. Re: Bug List thread
Liam Dilley Oct 2, 2014 6:25 PM (in response to Liam Dilley)Liquid Date tag not working by the way as well.






