Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323365 - [Webapp] Contents page shows topic labels with <link toc> tags, that reference to inaccessible plugin
Summary: [Webapp] Contents page shows topic labels with <link toc> tags, that referenc...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 4.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.7 M3   Edit
Assignee: Chris Goldthorpe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-23 04:29 EDT by Lukasz H. CLA
Modified: 2010-09-29 17:15 EDT (History)
2 users (show)

See Also:


Attachments
Required plugins and picture (21.00 KB, application/x-zip-compressed)
2010-08-25 13:55 EDT, Lukasz H. CLA
no flags Details
Screenshot from Eclipse 3.6 (40.33 KB, image/png)
2010-09-28 19:34 EDT, Chris Goldthorpe CLA
no flags Details
Help Contents (62.42 KB, image/jpeg)
2010-09-29 03:38 EDT, Lukasz H. CLA
no flags Details
Patch (1.30 KB, patch)
2010-09-29 17:14 EDT, Chris Goldthorpe CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lukasz H. CLA 2010-08-23 04:29:47 EDT
Build Identifier: Helios

I have configuration plugins with <topic label> and <link toc> tags inside. They reference to content plugins. Therefore when a content plugin is not present in a build, automatically generated "Contents page" still shows an appropriate topic label (fortunately this topic label is not shown in a TOC tree)

I used previously older version of Webapp (org.eclipse.help.webapp_3.4.x.jar) and it didn't have this bug.

Reproducible: Always

Steps to Reproduce:
1. Create a plugin without any content (configuration one) with a TOC xml file that reference to other plugins using <topic label> and <link toc> tags. For example:
<?xml version="1.0" encoding="UTF-8"?><toc label="Book name">
	<topic label="Document 1">
		<link toc="../doc_1/toc2.xml"/>
	</topic>
	<topic label="Document 2">
		<link toc="../doc_2/toc2.xml"/>
	</topic>
</toc>
2. Copy configuration plugin and Document 1 (but not Document 2) to you plugin directory
3. Browse your Information Center.
4. Click on "Book name". Contents page will appear with Document 1 and Document 2
Comment 1 Chris Goldthorpe CLA 2010-08-24 13:21:39 EDT
I'm not able to reproduce this using Eclipse 3.6 but I may not be following the steps exactly. Can you zip up the plug-ins required to reproduce this and attach them to the bug report?
Comment 2 Lukasz H. CLA 2010-08-25 13:55:10 EDT
Created attachment 177452 [details]
Required plugins and picture

Hi,

Attached.

BR,
Lukasz
Comment 3 Chris Goldthorpe CLA 2010-08-31 14:45:57 EDT
I was only able to import doc_1.jar as a deployable plug-in, sample_book.jar did not import. Also doc_1.xml has a topic associated with the toc, meaning that when the toc is selected the page content/content.html shows, rather than the generated page with links to child topics so I don't see how it could correspond to the screenshot.

<toc label="Sample doc" topic="content/content.html">
Comment 4 Lukasz H. CLA 2010-09-01 03:11:30 EDT
I didn't import them using eclipse. Just copied into WEB-INF/plugins directory of my Infocenter and reload a webapp.


The entry that you listed is of course true but you must be aware that there is used top-down integration model. To show this it's valid to use also sample_book.jar which is also associated with TOC in the following way:

<?xml version="1.0" encoding="UTF-8"?><toc label="Sample Book">
		<!--Documents-->
			<topic label="Document which should be visible">
				<link toc="../doc_1/doc_1.xml"/>
			</topic>
			<topic label="Document which should not be visible">
				<link toc="../doc_2/doc_2.xml"/>
			</topic>
</toc>

This makes "Sample doc" visible under "Sample Book" with the name "Document which should be visible". Therefore when you deployed only doc_1.jar, you saw TOC entries that correspond only to this doc and no relation to screenshot was found.

I hope this clarified the situation.
Comment 5 Artur CLA 2010-09-02 05:14:32 EDT
(In reply to comment #4)
> I didn't import them using eclipse. Just copied into WEB-INF/plugins directory
> of my Infocenter and reload a webapp.
> The entry that you listed is of course true but you must be aware that there is
> used top-down integration model. To show this it's valid to use also
> sample_book.jar which is also associated with TOC in the following way:
> <?xml version="1.0" encoding="UTF-8"?><toc label="Sample Book">
>         <!--Documents-->
>             <topic label="Document which should be visible">
>                 <link toc="../doc_1/doc_1.xml"/>
>             </topic>
>             <topic label="Document which should not be visible">
>                 <link toc="../doc_2/doc_2.xml"/>
>             </topic>
> </toc>
> This makes "Sample doc" visible under "Sample Book" with the name "Document
> which should be visible". Therefore when you deployed only doc_1.jar, you saw
> TOC entries that correspond only to this doc and no relation to screenshot was
> found.
> I hope this clarified the situation.

Hi,

I just wanted to report the same bug. As described above, in newest released version 3.6 this what is shown in TOC tree is not equal to this what is phisically stored under /plugins folder.

When I created my plugin with all needed categories but further I didn't copied all related plugins, in TOC view was fine but in Main Brosing Frame I see my empty entries with categories/subcategories. Basically like in attached Bug.jpg by Lukasz.

I also test attached sample book and have the same result, of course I follow strictly the guide.

Confirm that in 3.4 I didn't found this bug. Any chance this will be corected or you have an idea how I can find a soultion for hiding this empty entries from Main browsing frame.

Cheers,
Artur
Comment 6 Chris Goldthorpe CLA 2010-09-28 19:34:32 EDT
Created attachment 179798 [details]
Screenshot from Eclipse 3.6

I just tested again using Eclipse 3.6 with the toc you pasted and the doc_1 plug-in. Everything looked OK to me, see screenshot. I can't figure out why we are not seeing the same result. What's the build ID of the Eclipse build you are using?
Comment 7 Lukasz H. CLA 2010-09-29 03:38:44 EDT
Created attachment 179809 [details]
Help Contents
Comment 8 Lukasz H. CLA 2010-09-29 04:00:29 EDT
(In reply to comment #7)
> Created an attachment (id=179809) [details]
> Help Contents

Hi,

Sorry for duplicated comment but I pressed commit before wrote my answer.
I suppose you didn't launch help app in Infocenter mode as there is bookmarks tab on you screenshot

It seems that these are my Helios details: 
Version: Helios Release
Build id: 20100617-1415

I checked how this book looks inside Eclipse and as you can see in attached screenshot everything is ok (attached in my previous reply). Unfortunately the problem is related to war package with Infocenter that is deployed on Websphere/Tomcat (checked on both).

To my mind this problem was caused by changing writeContent function in org.eclipse.help.webapp plugin:
org/eclipse/help/internal/webapp/servlet/NavServlet.java

There was previously (in Eclipse 3.5 [3.4.x webapp version]) the following condition:
if (EnabledTopicUtils.isEnabled(subtopics[i])) {

while there is now: 
if (scope.inScope(subtopics[i])) {

so I can assume that it's somehow related to introduction of AbstractHelpScope

In case you need more details, below you can find about.html information:

Provider 	Plug-in Name 	Version 	Plug-in Id
IBM Corporation 	International Components for Unicode for Java (ICU4J) 	4.2.1.v20100412 	com.ibm.icu
JCraft, Inc. 	JSch 	0.1.41.v200903070017 	com.jcraft.jsch
NSN 	Customization Plugin 	1.0.0 	customization
DITA 	Sample Doc 	1.0.0 	doc_1
Eclipse.org 	Servlet API Bundle 	2.5.0.v200910301333 	javax.servlet
Eclipse.org 	Java Server Pages API Bundle 	2.0.0.v200806031607 	javax.servlet.jsp
Eclipse.org 	Apache Commons JSP 2.0 Expression Language Interpreter 	1.0.0.v201004212143 	org.apache.commons.el
Eclipse Orbit 	Apache Commons Logging Plug-in 	1.0.4.v201005080501 	org.apache.commons.logging
Eclipse.org 	Apache Jasper 2 Plug-in 	5.5.17.v201004212143 	org.apache.jasper
Eclipse Orbit 	Apache Lucene 	1.9.1.v20100518-1140 	org.apache.lucene
Eclipse Orbit 	Apache Lucene Analysis 	1.9.1.v20100518-1140 	org.apache.lucene.analysis
Eclipse.org 	Eclipse Content Mechanism 	3.4.100.v20100505-1235 	org.eclipse.core.contenttype
Eclipse.org 	Expression Language 	3.4.200.v20100505 	org.eclipse.core.expressions
Eclipse.org 	Eclipse Jobs Mechanism 	3.5.0.v20100515 	org.eclipse.core.jobs
Eclipse.org 	Core Runtime 	3.6.0.v20100505 	org.eclipse.core.runtime
Eclipse.org 	Core Runtime Plug-in Compatibility 	3.2.100.v20100505 	org.eclipse.core.runtime.compatibility
Eclipse.org - Equinox 	Equinox Application Container 	1.3.0.v20100512 	org.eclipse.equinox.app
Eclipse.org - Equinox 	Common Eclipse Runtime 	3.6.0.v20100503 	org.eclipse.equinox.common
Eclipse.org - Equinox 	Jetty Http Service 	2.0.0.v20100503 	org.eclipse.equinox.http.jetty
Eclipse.org - Equinox 	Http Service Registry Extensions 	1.1.0.v20100503 	org.eclipse.equinox.http.registry
Eclipse.org - Equinox 	Http Services Servlet 	1.1.0.v20100503 	org.eclipse.equinox.http.servlet
Eclipse.org - Equinox 	Servletbridge Http Service 	1.0.200.v20100503 	org.eclipse.equinox.http.servletbridge
Eclipse.org - Equinox 	Jasper Jsp Support Bundle 	1.0.200.v20100421 	org.eclipse.equinox.jsp.jasper
Eclipse.org - Equinox 	Jasper Jsp Registry Support Plug-in 	1.0.200.v20100503 	org.eclipse.equinox.jsp.jasper.registry
Eclipse.org - Equinox 	Eclipse Preferences Mechanism 	3.3.0.v20100503 	org.eclipse.equinox.preferences
Eclipse.org - Equinox 	Extension Registry Support 	3.5.0.v20100503 	org.eclipse.equinox.registry
	Servletbridge Extension Bundle 	1.2.0 	org.eclipse.equinox.servletbridge.extensionbundle
Eclipse.org 	Help System Core 	3.5.0.v20100524 	org.eclipse.help
Eclipse.org 	Help System Base 	3.5.0.v201006080911 	org.eclipse.help.base
Eclipse.org 	Help System Webapp 	3.5.0.v20100507 	org.eclipse.help.webapp
Eclipse.org - Equinox 	OSGi System Bundle 	3.6.0.v20100517 	org.eclipse.osgi
Eclipse.org - Equinox 	OSGi Release 4.2.0 Services 	3.2.100.v20100503 	org.eclipse.osgi.services
Eclipse.org 	Install/Update Configurator 	3.3.100.v20100512 	org.eclipse.update.configurator
NSN 	NAS6.0 	1.0.0 	sample.book


BR,
Lukasz
Comment 9 Chris Goldthorpe CLA 2010-09-29 17:08:24 EDT
Now I can see the problem using I20100921-1024.
Comment 10 Chris Goldthorpe CLA 2010-09-29 17:14:37 EDT
Created attachment 179897 [details]
Patch
Comment 11 Chris Goldthorpe CLA 2010-09-29 17:15:29 EDT
Patch applied to HEAD, Fixed.