Bug in HstLinktag.java

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug in HstLinktag.java

Joris Meijer
Hi Ard/list,

I think I found a bug in HstLinkTag.java which I found because suddenly all of the links made using a sitemapitemrefid were not working. Below is what I found:

1. We create a number of links using sitemapItemRefId (e.g. linkid_a, linkid_b, linkid_c)
2. The 3th link we create (funny enough the last one) cannot be matched, because a sitemap item with linkid_c does not exist in the sitemap
3. When I reload the page. linkid_a and linkid_b suddenly cannot be matched??

I noticed in HstLinkTag.java (version 2.24.05) that cleanup(); is not performed when a null pointer is returned. This is why creating the links works only the first time the app is loaded.

Summarizing, I thing the following lines:

if(this.link == null) {
            log.warn("Unable to rewrite link. Return EVAL_PAGE");
            return EVAL_PAGE;
        }

should be changed to

if(this.link == null) {
            log.warn("Unable to rewrite link. Return EVAL_PAGE");
            cleanup();
            return EVAL_PAGE;
        }

greetings,
Joris

P.S. for now I have a "workaround" which is making sure every single refId I use can be found ;)
Reply | Threaded
Open this post in threaded view
|

Re: Bug in HstLinktag.java

Simon Voortman-2
Hi,

This issue has already been solved and the fix will be available in release 2.24.06.

Many thanks for reporting with a possible fix!!

See issue HSTTWO-2208 [1] for more information.

Kind regards,

Simon

[1] https://issues.onehippo.com/browse/HSTTWO-2208

On Wed, Aug 1, 2012 at 1:43 PM, Joris Meijer <[hidden email]> wrote:
Hi Ard/list,

I think I found a bug in HstLinkTag.java which I found because suddenly all
of the links made using a sitemapitemrefid were not working. Below is what I
found:

1. We create a number of links using sitemapItemRefId (e.g. linkid_a,
linkid_b, linkid_c)
2. The 3th link we create (funny enough the last one) cannot be matched,
because a sitemap item with linkid_c does not exist in the sitemap
3. When I reload the page. linkid_a and linkid_b suddenly cannot be
matched??

I noticed in HstLinkTag.java (version 2.24.05) that cleanup(); is not
performed when a null pointer is returned. This is why creating the links
works only the first time the app is loaded.

Summarizing, I thing the following lines:



should be changed to



greetings,
Joris

P.S. for now I have a "workaround" which is making sure every single refId I
use can be found ;)



--
View this message in context: http://hippo.2275632.n2.nabble.com/Bug-in-HstLinktag-java-tp7578920.html
Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html


_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

RE: Bug in HstLinktag.java

Joris Meijer

Good to hear! Didn’t look that far forward though J

 

Greetings,

Joris

 

 

_______________________________________________________________________

Email_CBE.gifJoris Meijer

Consultant Online Technology | Capgemini Online

 

Capgemini "Netherlands" | Utrecht

Tel.: +31 30 68 93076 – Mob.: +31 6 5158 6350

www.capgemini.com

 

People matter, results count.

_______________________________________________________________________

Connect with Capgemini:
cid:image009.gif@01CC699A.C00EB090  cid:image010.gif@01CC699A.C00EB090  cid:image011.gif@01CC699A.C00EB090  cid:image012.gif@01CC699A.C00EB090  cid:image013.gif@01CC699A.C00EB090  cid:image014.gif@01CC699A.C00EB090

 

From: Simon Voortman-2 [via Hippo] [mailto:[hidden email]]
Sent: woensdag 1 augustus 2012 15:27
To: Meijer, Joris
Subject: Re: Bug in HstLinktag.java

 

Hi,

 

This issue has already been solved and the fix will be available in release 2.24.06.

 

Many thanks for reporting with a possible fix!!

 

See issue HSTTWO-2208 [1] for more information.

 

Kind regards,

 

Simon

 

[1] https://issues.onehippo.com/browse/HSTTWO-2208

On Wed, Aug 1, 2012 at 1:43 PM, Joris Meijer <[hidden email]> wrote:

Hi Ard/list,

I think I found a bug in HstLinkTag.java which I found because suddenly all
of the links made using a sitemapitemrefid were not working. Below is what I
found:

1. We create a number of links using sitemapItemRefId (e.g. linkid_a,
linkid_b, linkid_c)
2. The 3th link we create (funny enough the last one) cannot be matched,
because a sitemap item with linkid_c does not exist in the sitemap
3. When I reload the page. linkid_a and linkid_b suddenly cannot be
matched??

I noticed in HstLinkTag.java (version 2.24.05) that cleanup(); is not
performed when a null pointer is returned. This is why creating the links
works only the first time the app is loaded.

Summarizing, I thing the following lines:



should be changed to



greetings,
Joris

P.S. for now I have a "workaround" which is making sure every single refId I
use can be found ;)



--
View this message in context: http://hippo.2275632.n2.nabble.com/Bug-in-HstLinktag-java-tp7578920.html
Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html

 


_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html


If you reply to this email, your message will be added to the discussion below:

http://hippo.2275632.n2.nabble.com/Bug-in-HstLinktag-java-tp7578920p7578924.html

To unsubscribe from Bug in HstLinktag.java, click here.
NAML

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message
in error, please notify the sender immediately and delete all copies of this message.