Forum .LRN Q&A: How to debug a portlet?
I have created some different portlets, everyone works fine unless one that works well in the users portal but not in the class or club portal, it doesn't appear.
Any suggestion on how to debug it?
or any clues of what might be happening?
I can't find anything that could take me to find the error.
This portlet is very similar to the faq portlet.
Check Technical documentation at (http://openacs.org/projects/dotlrn/dotlrn-doc/ or http://dotlrn.mit.edu/documentation/groups.html#assignandtransfe ).
The following query can get you the portal_id:
select pretty_name, portal_id from dotlrn_communities_all;
Look at the datamodel in new-portal/sql/postgresql/portal-core-create.sql.
The following queries can get you the state (hidden, shaded, full, or pinned) of your portlet (portal element):
select page_id, pretty_name from portal_pages where portal_id = :portal_id_of_community;
select state from portal_element_map where page_id = :id_of_the_page;
Can you see your portlet on the customize layout page?
I can see the portlet in the customize layout page of the club/class page, even move it.
Peter, I did your query: select state from portal_element_map where page_id = :id_of_the_page;
and for the specific portlet in the respective club/page I got the state "full", the same state as other portlets that works.
But I can't still see it. Maybe is something related with permissions.
Wich specific permissions should I check?
the package ones or others?
For what should I look for?
Aldert, what you mean with "whether you are working in a member or non-member portal".
Peter, a debug mode also will be helpful, I hope you get the time to do it.
the only permissions I can find are related to the portal_id (portal_read_portal, portal_edit_portal, portal_admin_portal). If you can move elements on the customize page you must have the edit and/or admin privilege. I don't think you have a permission problem.
I have no experience with developing portlets myself so I'm mostly guessing here. I would probably check the HTML source, maybe add debug statements to the portal::evaluate_element proc or to new-portal/www/render_styles/individual/render-element.tcl. Any error messages in the log file?
was something that I missed at the package-portlet/www/package-portlet.adp
it was displaying only
rowcount@ gt 1
just changed to ge
just one letter... =)
Thanks anyway for your help, in the road I learned good things,
Non-members will be shown a 'non member' portal. If your portlet is not associated with this portal_id, it will not be shown to 'non members'.