You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Carsten Schinzer (JIRA)" <ji...@apache.org> on 2012/10/21 10:58:12 UTC

[jira] [Created] (OFBIZ-5057) Image rendering issue on productdetail.ftl

Carsten Schinzer created OFBIZ-5057:
---------------------------------------

             Summary: Image rendering issue on productdetail.ftl
                 Key: OFBIZ-5057
                 URL: https://issues.apache.org/jira/browse/OFBIZ-5057
             Project: OFBiz
          Issue Type: Bug
          Components: specialpurpose/ecommerce
    Affects Versions: SVN trunk
         Environment: FTL code, not relevant
            Reporter: Carsten Schinzer
            Priority: Minor
             Fix For: SVN trunk


Reference: Line 358
[!]     <#if productImageList?has_content>

A validation seems to have been introduced by rev. 1345532 where before on the FTL if clause, both checks (not null and hs content) were executed while now they are no longer. This leads to a failure to render of no related Content Images are on the Product but only attributed image URLs.

[1]     <#if productImageList?if_exists && productImageList?has_content>

Does the trick, so would the earlier version:

[2]     <#if productImageList != null && productImageList?has_content>

I also assume that with rev. 1345532 it was intended to put this here:

[3]     <#if productImageList?? && productImageList?has_content>


 I leave it to the FTL pros to comment and recommend for ca. 24 hours.
 If no comment by tomorrow, I shall propose to use the former code corresponding to [3] as this is what was the latest agreement made on OFBIZ-4916.
 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Re: [jira] [Commented] (OFBIZ-5057) Image rendering issue on productdetail.ftl

Posted by Carsten Schinzer <c....@gmail.com>.
Well, I do have products where the productImageList is definitely empty.
And it does not render properly but rather throws an exception.

With this double condition it works fine.

Good night :)


Carsten

[jira] [Comment Edited] (OFBIZ-5057) Image rendering issue on productdetail.ftl

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-5057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13480956#comment-13480956 ] 

Jacques Le Roux edited comment on OFBIZ-5057 at 10/22/12 6:39 AM:
------------------------------------------------------------------

Ha, I'm surprised, from the [definition of has_content|http://freemarker.sourceforge.net/docs/ref_builtins_expert.html#ref_builtin_has_content] it should be sufficient:
<<It is true if the variable exists (and isn't Java null) and is not ``empty'', otherwise it is false>>

Have you an use case?
                
      was (Author: jacques.le.roux):
    Ha, I'm surprised, from the [definition of has_content|freemarker.sourceforge.net/docs/ref_builtins_expert.html#ref_builtin_has_content] it should be sufficient:
<<It is true if the variable exists (and isn't Java null) and is not ``empty'', otherwise it is false>>

Have you an use case?
                  
> Image rendering issue on productdetail.ftl
> ------------------------------------------
>
>                 Key: OFBIZ-5057
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5057
>             Project: OFBiz
>          Issue Type: Bug
>          Components: specialpurpose/ecommerce
>    Affects Versions: SVN trunk
>         Environment: FTL code, not relevant
>            Reporter: Carsten Schinzer
>            Priority: Minor
>             Fix For: SVN trunk
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Reference: Line 358
> !     <#if productImageList?has_content>
> A validation seems to have been introduced by rev. 1345532 where before on the FTL if clause, both checks (not null and hs content) were executed while now they are no longer. This leads to a failure to render of no related Content Images are on the Product but only attributed image URLs.
> 1     <#if productImageList?if_exists && productImageList?has_content>
> Does the trick, so would the earlier version:
> 2     <#if productImageList != null && productImageList?has_content>
> I also assume that with rev. 1345532 it was intended to put this here:
> 3     <#if productImageList?? && productImageList?has_content>
>  I leave it to the FTL pros to comment and recommend for ca. 24 hours.
>  If no comment by tomorrow, I shall propose to use the former code corresponding to [3] as this is what was the latest agreement made on OFBIZ-4916.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OFBIZ-5057) Image rendering issue on productdetail.ftl

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-5057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13480956#comment-13480956 ] 

Jacques Le Roux commented on OFBIZ-5057:
----------------------------------------

Ha, I'm surprised, from the [definition of has_content|freemarker.sourceforge.net/docs/ref_builtins_expert.html#ref_builtin_has_content] it should be sufficient:
<<It is true if the variable exists (and isn't Java null) and is not ``empty'', otherwise it is false>>

Have you an use case?
                
> Image rendering issue on productdetail.ftl
> ------------------------------------------
>
>                 Key: OFBIZ-5057
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5057
>             Project: OFBiz
>          Issue Type: Bug
>          Components: specialpurpose/ecommerce
>    Affects Versions: SVN trunk
>         Environment: FTL code, not relevant
>            Reporter: Carsten Schinzer
>            Priority: Minor
>             Fix For: SVN trunk
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Reference: Line 358
> !     <#if productImageList?has_content>
> A validation seems to have been introduced by rev. 1345532 where before on the FTL if clause, both checks (not null and hs content) were executed while now they are no longer. This leads to a failure to render of no related Content Images are on the Product but only attributed image URLs.
> 1     <#if productImageList?if_exists && productImageList?has_content>
> Does the trick, so would the earlier version:
> 2     <#if productImageList != null && productImageList?has_content>
> I also assume that with rev. 1345532 it was intended to put this here:
> 3     <#if productImageList?? && productImageList?has_content>
>  I leave it to the FTL pros to comment and recommend for ca. 24 hours.
>  If no comment by tomorrow, I shall propose to use the former code corresponding to [3] as this is what was the latest agreement made on OFBIZ-4916.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OFBIZ-5057) Image rendering issue on productdetail.ftl

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-5057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13481201#comment-13481201 ] 

Jacques Le Roux commented on OFBIZ-5057:
----------------------------------------

{quote}
Well, I do have products where the productImageList is definitely empty.
And it does not render properly but rather throws an exception.
With this double condition it works fine.
{quote}
                
> Image rendering issue on productdetail.ftl
> ------------------------------------------
>
>                 Key: OFBIZ-5057
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5057
>             Project: OFBiz
>          Issue Type: Bug
>          Components: specialpurpose/ecommerce
>    Affects Versions: SVN trunk
>         Environment: FTL code, not relevant
>            Reporter: Carsten Schinzer
>            Priority: Minor
>             Fix For: SVN trunk
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Reference: Line 358
> !     <#if productImageList?has_content>
> A validation seems to have been introduced by rev. 1345532 where before on the FTL if clause, both checks (not null and hs content) were executed while now they are no longer. This leads to a failure to render of no related Content Images are on the Product but only attributed image URLs.
> 1     <#if productImageList?if_exists && productImageList?has_content>
> Does the trick, so would the earlier version:
> 2     <#if productImageList != null && productImageList?has_content>
> I also assume that with rev. 1345532 it was intended to put this here:
> 3     <#if productImageList?? && productImageList?has_content>
>  I leave it to the FTL pros to comment and recommend for ca. 24 hours.
>  If no comment by tomorrow, I shall propose to use the former code corresponding to [3] as this is what was the latest agreement made on OFBIZ-4916.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OFBIZ-5057) Image rendering issue on productdetail.ftl

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-5057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13481213#comment-13481213 ] 

Jacques Le Roux commented on OFBIZ-5057:
----------------------------------------

Well this is pretty weird since if_exist or ?? are both testing for null and not emptyness, while has_content is clerarly for testing emptyness. When you read all the definition above (I have fixed the link, FF was removing the protocol from urls and I [finally got rif of that on my machine|http://betashuffle.com/1602/force-firefox-http-part-visible-address-bar/]) there is more about the meaning of empty for has_content. Could you try by replacing (only) has_content with "!?length > 0"
                
> Image rendering issue on productdetail.ftl
> ------------------------------------------
>
>                 Key: OFBIZ-5057
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5057
>             Project: OFBiz
>          Issue Type: Bug
>          Components: specialpurpose/ecommerce
>    Affects Versions: SVN trunk
>         Environment: FTL code, not relevant
>            Reporter: Carsten Schinzer
>            Priority: Minor
>             Fix For: SVN trunk
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Reference: Line 358
> !     <#if productImageList?has_content>
> A validation seems to have been introduced by rev. 1345532 where before on the FTL if clause, both checks (not null and hs content) were executed while now they are no longer. This leads to a failure to render of no related Content Images are on the Product but only attributed image URLs.
> 1     <#if productImageList?if_exists && productImageList?has_content>
> Does the trick, so would the earlier version:
> 2     <#if productImageList != null && productImageList?has_content>
> I also assume that with rev. 1345532 it was intended to put this here:
> 3     <#if productImageList?? && productImageList?has_content>
>  I leave it to the FTL pros to comment and recommend for ca. 24 hours.
>  If no comment by tomorrow, I shall propose to use the former code corresponding to [3] as this is what was the latest agreement made on OFBIZ-4916.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (OFBIZ-5057) Image rendering issue on productdetail.ftl

Posted by "Carsten Schinzer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-5057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Schinzer updated OFBIZ-5057:
------------------------------------

           Description: 
Reference: Line 358
!     <#if productImageList?has_content>

A validation seems to have been introduced by rev. 1345532 where before on the FTL if clause, both checks (not null and hs content) were executed while now they are no longer. This leads to a failure to render of no related Content Images are on the Product but only attributed image URLs.

1     <#if productImageList?if_exists && productImageList?has_content>

Does the trick, so would the earlier version:

2     <#if productImageList != null && productImageList?has_content>

I also assume that with rev. 1345532 it was intended to put this here:

3     <#if productImageList?? && productImageList?has_content>


 I leave it to the FTL pros to comment and recommend for ca. 24 hours.
 If no comment by tomorrow, I shall propose to use the former code corresponding to [3] as this is what was the latest agreement made on OFBIZ-4916.
 

  was:
Reference: Line 358
[!]     <#if productImageList?has_content>

A validation seems to have been introduced by rev. 1345532 where before on the FTL if clause, both checks (not null and hs content) were executed while now they are no longer. This leads to a failure to render of no related Content Images are on the Product but only attributed image URLs.

[1]     <#if productImageList?if_exists && productImageList?has_content>

Does the trick, so would the earlier version:

[2]     <#if productImageList != null && productImageList?has_content>

I also assume that with rev. 1345532 it was intended to put this here:

[3]     <#if productImageList?? && productImageList?has_content>


 I leave it to the FTL pros to comment and recommend for ca. 24 hours.
 If no comment by tomorrow, I shall propose to use the former code corresponding to [3] as this is what was the latest agreement made on OFBIZ-4916.
 

    Remaining Estimate: 0h
     Original Estimate: 0h
    
> Image rendering issue on productdetail.ftl
> ------------------------------------------
>
>                 Key: OFBIZ-5057
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5057
>             Project: OFBiz
>          Issue Type: Bug
>          Components: specialpurpose/ecommerce
>    Affects Versions: SVN trunk
>         Environment: FTL code, not relevant
>            Reporter: Carsten Schinzer
>            Priority: Minor
>             Fix For: SVN trunk
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Reference: Line 358
> !     <#if productImageList?has_content>
> A validation seems to have been introduced by rev. 1345532 where before on the FTL if clause, both checks (not null and hs content) were executed while now they are no longer. This leads to a failure to render of no related Content Images are on the Product but only attributed image URLs.
> 1     <#if productImageList?if_exists && productImageList?has_content>
> Does the trick, so would the earlier version:
> 2     <#if productImageList != null && productImageList?has_content>
> I also assume that with rev. 1345532 it was intended to put this here:
> 3     <#if productImageList?? && productImageList?has_content>
>  I leave it to the FTL pros to comment and recommend for ca. 24 hours.
>  If no comment by tomorrow, I shall propose to use the former code corresponding to [3] as this is what was the latest agreement made on OFBIZ-4916.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira