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:
In one.html, I have this link:
(When posting your links, enclose them in code blocks by selecting the text and clicking the Code button.)
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
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
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.
Compare my href to your href. What is the difference?
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
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:
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:
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.
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
I had this problem and found a dirty fix:
relative_urls : "true", document_base_url : "<%= sDocBase %>",
convert_urls : "false", relative_urls : "true", // document_base_url : "<%= sDocBase %>",
using workflow has a second file to fix:
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