External links act unexpectedly in Preview mode

Some links to external websites will not load or load unexpectedly in Preview mode.

Reviewed December 8, 2022

The Issue

We have observed 'unexpected behavior' when some links to sites outside of the UBCMS are clicked in Author's Preview mode.  

Some sites do not open -- instead authors will see a browser security warning, a server error page, or even what appears to be a blank page. The symptoms vary depending on the external website and browser, and has been observed for commercial sites like Google Scholar, PuBMed, news media such as NY Times, and social media.  

Other sites will load, but the browser location bar will still display the URL of the previous page in Author. This will always occur for some links in your site's header or footer such as the brand lockup ('UB' logo and  'University at Buffalo') as well as the system-wide links to 'UB Home', 'UB Directory', 'Campus Maps', 'Privacy' and 'Accessibility'.

Again, this unexpected behavior just applies to links that leave the UBCMS Author environment. Internal navigation and links to other UBCMS pages should always load normally, provided they are built as references ("/content...") and not absolute URLs ("https://...").

The misbehavior has two somewhat related causes.

In the first case, the external website is refusing to allow their page to be hosted within another site (the UBCMS).  The Author Preview mode uses a frame to include the top tool bar. When the link is initially clicked, the browser tries to load that new page within the same frame, but the other website refuses the request, and instead a security warning, or error, or even a blank page loads instead. This may also occur if the external website is linked as "http://..." instead of "https://..." -- browsers are often set to prevent an insecure website (http://...") from being loaded from a secure ("https://...") page.

In the second case, the UBCMS successfully loads the new page, within the Author frame, and while the page is displayed, the browser does not realize an external website has loaded and mistakenly leaves the previous URL displayed.  

Workaround

This all falls under 'normal behavior'. 

As a workaround, to successfully view or test external links in Author, please try one of these alternatives:

  • Switch to 'View in Admin' from Page Information ('equalizer' button) then click the link normally. This action removes the top toolbar and its frame.
  • Switch to Preview mode normally, but then right-click and choose 'open in new tab', or try try Control-click (or Command-click for Apple devices). This will open the target page in a new tab.

And as a best practice, whenever you add links to pages that are within the UBCMS, please use a reference ("/content...") instead of an absolute URL ("https://..."). This will prevent this odd browser behavior, and also assist the UBCMS in maintaining your links if the target pages are moved.

Your live site will not be effected by this behavior.

Was This Information Helpful?

(Required)
(Required)
(so we can thank you or request more details)
(Required)
(buffalo.edu addresses only please)
(Required)