Page details not shows information

23 views
Skip to first unread message

youssouf adaweh

unread,
Feb 12, 2017, 9:25:46 AM2/12/17
to Hippo Community
Hello,

In my productpage-main.ftl, I don't get into the "IF" instructions : "<<#if document??>".
I attended this tutorial to the letter : https://www.onehippo.org/trails/developer-trail/develop-new-features/products-part-3-product-detail.html.

The beans Facture exist and in my log I don't have errors.

I already created a new document with details information. So the document exists and normally the site must find these document. I don't understand why it says that the document not exist.


Thank you very much

Marijan Milicevic

unread,
Feb 12, 2017, 10:09:13 AM2/12/17
to hippo-c...@googlegroups.com
this was already discussed and explained in original thread, I'll repeat again:

if you are *sure* your bean is there, just remove if statement...
if you are not sure  (e.g. in cases where you don't throw 404 error in case bean is there, or if you are using your document where user needs to pick the document so you'll get errors in or example channel manager) 
than just leave it there...


cheers
marijan 
 

Thank you very much

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.

Marijan Milicevic

unread,
Feb 12, 2017, 10:10:22 AM2/12/17
to hippo-c...@googlegroups.com
On Sun, Feb 12, 2017 at 4:09 PM, Marijan Milicevic <marijan....@bloomreach.com> wrote:
On Sun, Feb 12, 2017 at 3:25 PM, youssouf adaweh <hamad...@gmail.com> wrote:
Hello,

In my productpage-main.ftl, I don't get into the "IF" instructions : "<<#if document??>".
I attended this tutorial to the letter : https://www.onehippo.org/trails/developer-trail/develop-new-features/products-part-3-product-detail.html.

The beans Facture exist and in my log I don't have errors.

I already created a new document with details information. So the document exists and normally the site must find these document. I don't understand why it says that the document not exist.



this was already discussed and explained in original thread, I'll repeat again:

if you are *sure* your bean is there, just remove if statement...
if you are not sure  (e.g. in cases where you don't throw 404 error in case bean is there, or if you are using your document where user needs to pick the document so you'll get errors in or example channel manager) 

this:
" 404 error in case bean is there,"  

should be:

" 404 error in case bean is *not* there, "

/m

youssouf adaweh

unread,
Feb 13, 2017, 4:13:08 AM2/13/17
to Hippo Community
Thank you for your answer.

I remove if statement and I have a blank page. He don't recognize the element  "document". The bean exist also.

youssouf adaweh

unread,
Feb 13, 2017, 4:31:48 AM2/13/17
to Hippo Community
Even in the channel manager, I have blank page when I want show my document details. So I don't know where is the problem ?


Le dimanche 12 février 2017 15:25:46 UTC+1, youssouf adaweh a écrit :

youssouf adaweh

unread,
Feb 13, 2017, 4:41:46 AM2/13/17
to Hippo Community
I have this error in my log : 
                
                     [HstFreemarkerServlet] The following has evaluated to null or missing: document  [in template "webfile:/freemarker/myhippoproject/facturepage-main.ftl" at line 8, column 29]



Le dimanche 12 février 2017 15:25:46 UTC+1, youssouf adaweh a écrit :

Marijan Milicevic

unread,
Feb 13, 2017, 4:48:04 AM2/13/17
to hippo-c...@googlegroups.com
On Mon, Feb 13, 2017 at 10:41 AM, youssouf adaweh <hamad...@gmail.com> wrote:
I have this error in my log : 
                
                     [HstFreemarkerServlet] The following has evaluated to null or missing: document  [in template "webfile:/freemarker/myhippoproject/facturepage-main.ftl" at line 8, column 29]


so,that's why we have if statement, which you obviously removed.    
So, document (bean) is missing, check your sitemap if paths are ok,
In previous thread, I wrote that path to documents was wrong in your sitemap, have you fixed that?

I would suggest you follow our training trail and read documentation about site mapping [1].
With trial and error approach you'll just waste a lot of time and as end result, you'll just get frustrated (and maybe we will too ;-) )
cheers
marijan




Le dimanche 12 février 2017 15:25:46 UTC+1, youssouf adaweh a écrit :
Hello,

In my productpage-main.ftl, I don't get into the "IF" instructions : "<<#if document??>".
I attended this tutorial to the letter : https://www.onehippo.org/trails/developer-trail/develop-new-features/products-part-3-product-detail.html.

The beans Facture exist and in my log I don't have errors.

I already created a new document with details information. So the document exists and normally the site must find these document. I don't understand why it says that the document not exist.


Thank you very much

--

youssouf adaweh

unread,
Feb 13, 2017, 5:35:06 AM2/13/17
to Hippo Community
I'm sorry to bother you. Excuse me. But it is very important for my school project and very urgent.

I fixed the problem with the wrong path document. I think the paths in the sitemap is OK now.

You can check the project (the link is above)  if you have time please.


Le dimanche 12 février 2017 15:25:46 UTC+1, youssouf adaweh a écrit :

Jasper Floor

unread,
Feb 13, 2017, 6:39:52 AM2/13/17
to Hippo Community
The link you gave is to a folder of pictures.

--

youssouf adaweh

unread,
Feb 13, 2017, 8:24:36 AM2/13/17
to Hippo Community


Le dimanche 12 février 2017 15:25:46 UTC+1, youssouf adaweh a écrit :

youssouf adaweh

unread,
Feb 13, 2017, 10:13:02 AM2/13/17
to Hippo Community
The link of my project


Le dimanche 12 février 2017 15:25:46 UTC+1, youssouf adaweh a écrit :

Jasper Floor

unread,
Feb 13, 2017, 11:30:53 AM2/13/17
to Hippo Community
change the name of your directory to factures
You reference  nonexisting template
You don't seem to have a component to put anything relevant on the request, so nothing will be shown anyway

mvg,
Jasper

--

youssouf adaweh

unread,
Feb 13, 2017, 4:13:56 PM2/13/17
to Hippo Community
Oh no, I give up!. It is a lot for me. I try everything (all things that you suggest me) and It doesn't work.

Thank you for everything by the way.


Le dimanche 12 février 2017 15:25:46 UTC+1, youssouf adaweh a écrit :

youssouf adaweh

unread,
Feb 14, 2017, 10:45:22 AM2/14/17
to Hippo Community
I do change that you suggest me but it doesn't work . My new link for project is that :



Le dimanche 12 février 2017 15:25:46 UTC+1, youssouf adaweh a écrit :

Jasper Floor

unread,
Feb 15, 2017, 6:12:06 AM2/15/17
to Hippo Community
Try to think about what is supposed to happen. 


So how will this match on the sitemap? In your case it will match /hst:hst/hst:configurations/myhippoproject/hst:sitemap/factures/_any_.html

So what does this _any_.html do? It matches a component  /hst:hst/hst:configurations/myhippoproject/hst:pages/facturepage.

Let's see what that does. It gets more complicated here because of inheritance, but I think we can mostly ignore that for the moment. 'hst:pages/facturepage' has a child main and that has a child left. 'main' won't do anything. It uses the inherited configuration which will use the template 'twocolumns-main.ftl'. 'left' uses the EssentialsListComponent and 'facturepage-main.ftl' as a template. So at best something will display in the left column.

'facturepage-main.ftl' expects an object called 'document' to be available. The EssentialsListComponent does not make such an object available. You need a component that finds the correct document and puts that on the request as 'document'.

So you are still missing some steps to display the document. You should go back and read the tutorial and find where you skipped some steps.

mvg,
Jasper




--

youssouf adaweh

unread,
Feb 15, 2017, 8:18:04 AM2/15/17
to Hippo Community
It works.

THANK YOUUUUUUUU VERY MUCH


Le dimanche 12 février 2017 15:25:46 UTC+1, youssouf adaweh a écrit :
Reply all
Reply to author
Forward
0 new messages