Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OpenCMS 11] Error internal link #738

Closed
acastmae opened this issue Apr 1, 2022 · 7 comments
Closed

[OpenCMS 11] Error internal link #738

acastmae opened this issue Apr 1, 2022 · 7 comments

Comments

@acastmae
Copy link

acastmae commented Apr 1, 2022

In the text editor used in the "article" and "content section" elements, when an internal link to a portal page is selected, an error occurs. It is necessary to manually add "/opencms/" to make it work.
I would like to know how to avoid this step every time I have to insert a link.
Thank you very much for your help.

The first image shows how the link looks like when selecting it, giving error and the second one shows the link adding manually "/opencms/" to make it work.

image
image

@gWestenberger
Copy link
Contributor

Please provide more information on what the error is, and how to reproduce it.

@acastmae
Copy link
Author

acastmae commented Apr 1, 2022

Drag a "Content section" element
image

Then you enter a link that directs to a page of the portal, in my case I want it to redirect to the home page.
image

When the cover page is selected, the path is as follows: "/en/home"
image

If you save and click on the link, you get an error because it redirects to a page that does not exist.
image

On the other hand, if you add "/opencms/" in front of the path, i.e. the path would be "/opencms/en/home/" it does redirect to the page in question.
image

What I want is not to have to always add "/opencms/" manually in front of each path to make it work.

@gWestenberger
Copy link
Contributor

Check if the link is correctly recognized as an internal link, in the source code of cs_00355.xml (Explorer > Context menu > Advanced > Edit control code).

There should be an entry somewhere like

      <links>
        <link name="link0" internal="true" type="A">
          <target><![CDATA[/sites/default/mercury-demo/home/]]></target>
          <uuid>f4c48a55-3a95-11e9-bd84-0242ac11002b</uuid>
        </link>
      </links>

Note the internal="true" attribute and the UUID, that's how you can tell it was saved as an internal link.

@acastmae
Copy link
Author

acastmae commented Apr 1, 2022

I have checked it and it recognizes it as an external link, is there any way to configure it to select it to be an internal link?
I mean, is there any way to fix it, either by modifying the configuration files for example, or can it only be modified manually?
Thank you very much for your help

@gWestenberger
Copy link
Contributor

gWestenberger commented Apr 1, 2022

Do you have a reverse proxy like Apache or haproxy running in front of Tomcat? Make sure it sends the host name from the request URL to Tomcat. Also, if said reverse proxy does SSL termination, make sure you have the attribute sslmode="manual-ep-termination" on your ´workplace-server´ and ´site´ entries in your opencms-sites.xml. (And of course the host names in opencms-sites.xml should also match the ones you actually use).

@Warzag
Copy link

Warzag commented May 27, 2022

Hello. Hi gWestenberger, hi acastmae, I have the same problem, i tried to configure opencms-sites.xml like in you comment but dont work and the portal dont start.

My problem only occurs in a PRE or PRO environment when I change the local url (http://aleno1:10020/) to the production/preproduction url (diwebsa.es).

Thanks for help

@gWestenberger
Copy link
Contributor

You have to make sure the host name you use to access OpenCms gets correctly forwarded to Tomcat in the host header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants