-
1. Re: Hyperlink not working from CMS html page to another CMS
peterj Apr 9, 2008 11:35 AM (in response to shankarkhanna)What are you setting the hyperlink to?
Here is an example of what worked for me. I create a new base directory, named xxx, in CMS (so now CMS shows default and xxx as directories). In xxx I placed:
one.html
two.html
In one.html, I have this link:<a href="xxx/two.html">Next</a>
(When posting your links, enclose them in code blocks by selecting the text and clicking the Code button.) -
2. Re: Hyperlink not working from CMS html page to another CMS
shankarkhanna Apr 10, 2008 5:36 AM (in response to shankarkhanna)I created a new portal called TestPortal and created a new page called MyPage. I made the TestPortal as default Portal.
In CMS, I created a new folder 'TestPortal' and added two htm files in it page1.htm and page2.htm
In WYSIWYG Editor, Following is the code in page1.htm in code view<p><a href="/portal/content/TestPortal/page2.htm">Page 2</a></p>
From pagelayout of 'MyPage' page i added the CMS content in center region.
When i accessed the portal using http://localhost:8080/portal, it showed me the TestPortal which is now the default portal. It also showed me MyPage tab having page1.htm content.
In the address bar, this is the url
http://localhost:8080/portal/auth/portal/TestPortal/mypage
But when i click on the link, i got 404 error in browser saying "The requested resource () is not available."
In the address bar, this is the url "http://localhost:8080/portal/content/TestPortal/page2.htm" (after clicking on the link)
Is there anything wrong i am doing here.
Also, if i access the default JBoss Portal ->default page and click on the link "JBoss Portal project", it shows content of next page on the same portlet window and address bar shows the following url
http://localhost:8080/portal/auth/portal/default/default/CMSPortletWindow_5?action=2&uri=%2Fdefault%2Fproject.html
we can see that it added "CMSPortletWindow_5".
But in my case, it did not add the window name while accessing the link from page1.htm file.
And even if i create the same file as index.htm file in default page of default portal, it is not working.
Please Help
Shankar Khanna -
3. Re: Hyperlink not working from CMS html page to another CMS
peterj Apr 10, 2008 11:30 AM (in response to shankarkhanna)Compare my href to your href. What is the difference?
-
4. Re: Hyperlink not working from CMS html page to another CMS
shankarkhanna Apr 10, 2008 11:42 AM (in response to shankarkhanna)I only gave the href like this : TestPortal/mypage but when i create the file using create button in WYSIWYG Editor, it automatically changes it to /portal/content/TestPortal/page2.htm
-
5. Re: Hyperlink not working from CMS html page to another CMS
peterj Apr 10, 2008 12:36 PM (in response to shankarkhanna)There is a bug in the CMS content editor.
I loaded my CMS content via a zip file - I had edited all of it externally. I created a new portal and page, like you did, and added a cms window to that page, pointing the cms window to by index.html file. I went to that portal page, saw my content, clicked on a link, and the new content showed, just like I expected. By the way, I looked at the URL for the link and saw this:
http://localhost:8080/portal/auth/portal/portala/page1/cms1?action=2&uri=%2Fxxx%2Ftwo.html
Then I edited index.html, making a copy of the link to two.html. And now neither link works! When I click on the link, I am show the default page of the default portal, with the "JBoss Portal welcome text" CMS content being replaced by the contents of two.html. I checked the URL for the link and it is now:
http://localhost:8080/portal/content/book/two.html
So my recommendation is to create your CMS content externally and load it into CMS, and avoid the editor!
Julien, Thomas, Prabhat, is this a know problem? If not, I'll open a JIRA. -
6. Re: Hyperlink not working from CMS html page to another CMS
soshah Apr 10, 2008 1:55 PM (in response to shankarkhanna)Peter-
Go ahead and create a JIRA so that I can look into this is more detail.
p.s. don't forget to reference this forum thread on the JIRA task
Thanks -
8. Re: Hyperlink not working from CMS html page to another CMS
cavani Jun 24, 2008 7:36 PM (in response to shankarkhanna)I had this problem and found a dirty fix:
edit file:
jboss-portal.sar/portal-cms.sar/portal-cms.war/WEB-INF/jsp/cms/admin/edit.jsp
replace:relative_urls : "true", document_base_url : "<%= sDocBase %>",
by:convert_urls : "false", relative_urls : "true", // document_base_url : "<%= sDocBase %>",
Thanks, -
9. Re: Hyperlink not working from CMS html page to another CMS
cavani Jun 25, 2008 3:02 PM (in response to shankarkhanna)using workflow has a second file to fix:
jboss-portal.sar/portal-cms.sar/portal-cms.war/WEB-INF/jsp/cms/admin/pending_items.jsp -
10. Re: Hyperlink not working from CMS html page to another CMS
soshah Jul 15, 2008 1:15 AM (in response to shankarkhanna)Guys-
looks like cavani's suggestion which he considered a dirty fix, is actually what is needed to handle relative urls.
Our approach to cms window has changed, so relative urls do not need to be munged before storage in the WYSIWIG editor anymore.
This issue is fixed and will be part of the 2.6.6 release. See the JIRA task for details
Thanks