Issue 11736

Show separator line in header only if following keywords exist

11736
Reporter: mdoering
Type: Improvement
Summary: Show separator line in header only if following keywords exist
Priority: Minor
Resolution: Fixed
Status: Closed
Created: 2012-08-27 11:45:21.652
Updated: 2013-08-29 14:45:59.655
Resolved: 2012-11-16 16:42:14.605
        
Description: On this dataset page for example the separator should not show at all:
http://localhost:8080/dataset/aab0cf80-0c64-11dd-84d1-b8a03c50a862

Can we change the CSS from 

to sth that matches the



Author: javierarce
Created: 2012-10-30 13:27:11.6
Updated: 2012-10-30 13:27:11.6
        
I cannot test this, I'm getting 500 errors when trying to access to datasets:

HTTP ERROR 500

Problem accessing /dataset/717b3b87-0ebd-46b4-812b-4a29786798d9. Reason:

    Server Error
Caused by:

java.lang.ArrayIndexOutOfBoundsException
Powered by Jetty://

    


Author: mdoering@gbif.org
Comment: looks like a freemarker template problem, look at the initial error you get in the console, it should tell you exactly on which line of the ftl the error happens.
Created: 2012-10-30 14:04:47.074
Updated: 2012-10-30 14:04:47.074


Author: jcuadra@gbif.org
Created: 2012-10-30 14:24:59.488
Updated: 2012-10-30 14:25:33.632
        
Jumping in...

I was getting same stuff over here. on the dataset DetailAction the object returned was changed to a PagingResponse (instead of a List), but the ftl is not checking nullity of the inner result list.

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression constituents.result is undefined on line 544, column 16 in WEB-INF/pages/dataset/detail.ftl.


I can commit the fix, if this does not interfer with your work Javier? (fix is on the detail.ftl template)
    


Author: jcuadra@gbif.org
Created: 2012-10-30 14:58:14.955
Updated: 2012-10-30 14:58:49.393
        
just committed the fix. was not the nullity issue, was just a mispelling of "result" instead of "results".
http://code.google.com/p/gbif-portal/source/detail?r=1126
    


Author: javierarce
Comment: I still cannot access dataset pages. I get the "Server Error" message.
Created: 2012-11-16 15:17:27.532
Updated: 2012-11-16 15:17:27.532


Author: mdoering@gbif.org
Created: 2012-11-16 15:28:40.655
Updated: 2012-11-16 15:28:40.655
        
this url works for me locally using the api webservices when the portal is started via mvn -P gbif-api,nerf
http://localhost:8080/dataset/717b3b87-0ebd-46b4-812b-4a29786798d9

it doesnt for you, javier?
    


Author: javierarce
Created: 2012-11-16 15:33:59.762
Updated: 2012-11-16 15:33:59.762
        
No. I also run the portal using the same command. The cause of the error seem to be:

java.lang.ArrayIndexOutOfBoundsException
    


Author: mdoering@gbif.org
Comment: that usually indicates a freemarker template error. Can you look into the beginning of the error in the console? that tells you where in the template the error happens. Joses going to fix that now, a minute
Created: 2012-11-16 15:43:36.648
Updated: 2012-11-16 15:43:36.648


Author: javierarce
Created: 2012-11-16 15:48:55.277
Updated: 2012-11-16 15:48:55.277
        
This is the line:

==> list dataset.dataDescriptions as dd [on line 174, column 5 in WEB-INF/pages/dataset/detail.ftl]
 in user-directive common.article [on line 20, column 1 in WEB-INF/pages/dataset/detail.ftl]

It points to this line:

<#list dataset.dataDescriptions as dd>

It seems that dataset is nil or it doesn't have descriptions (?).



    


Author: jcuadra@gbif.org
Created: 2012-11-16 16:23:28.554
Updated: 2012-11-16 16:23:28.554
        
Hi Javier, when running locally the portal, please also add a -U flag to your command


$mvn jetty:run -Pnerf,portal -U

that will update your local repository with the latest dependencies. Hopefully should solve your problem
    


Author: javierarce
Comment: Thanks!
Created: 2012-11-16 16:42:51.268
Updated: 2012-11-16 16:42:51.268