TYPO3 v10 - absolute links - config.absRefPrefix dead? - hyperlink

How to tell TYPO3 v10 (globally) to generate absolute links in frontend? config.absRefPrefix doesn't seem to work any longer. Also, using absolute urls as base in site configuration doesn't have any effect. Still relative links in frontend.
EDIT:
config.absRefPrefix seems to work for embedded resources (script, img etc.) but not for usually generated hyperlinks (MenuProcessor, RTE links etc.). Do i really need to set option absolute=1 for all my links generated by view helpers and configure RTE processing to generate absolute links? Thought that's why the global option "absRefPrefix" exists...

This problem already exists since TYPO3 v9. There is a ticket in the bug tracker regarding this issue. I assume that in TYPO3 v12 config. absRefPrefix might be removed completely.
In the ticket comments you can find a number of hints, how to implement absolute links in various places:
use (NO/ACT/...).stdWrap.typolink.forceAbsoluteUrl = 1 for HMENU
for links in the CKEditor RTE this config make every link absolute:
lib.parseFunc_RTE.tags.a.typolink {
forceAbsoluteUrl = 1
forceAbsoluteUrl.scheme = https
}
if you want to globally rewrite all links to absolute links, you can implement the middleware mentioned in the ticket.

Related

TYPO3 8.7 is it possible to output a specific page with multiple url path s

I'm trying to integrate a vue.js application into a typo3 page.
I have a full functional TYPO3 instance where I can create own pages, edit the content and more. Now I want to add an existing vue.js application within this page.
Therefore I created an extension which added all necessary resources (js, css) and added an own content type which controls the integrations and configurations. The content type outputs a vue.js entry point. So far everything works. Smaller vue.js applications works as they should.
Now comes the challenge: When I want to create a more complex application which relies on the router functionality, I run into a problem.
Let's assume, I integrate my application into the page /shop and my application tries to render a product under /shop/product/some-id. This doesn't work. The URL processing is done by TYPO3 (as designed).
I tried to find a solution within the documentation but I'm not sure what I should search. I need a way to output the same page (/shop) regardless the following path. Does someone have a hint?
I found a solution. Within TYPO3 v8 is it possible to use the realurl extension for this purpose.
It is possible to define an own decode preprocessing function and analyse the current url.
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['decodeSpURL_preProc'][] = RealUrlManipulation::class . '->decodeSpURL_preProc';
Within this method is it possible to change the url for TYPO3 inner processing and set it to an known url.

Umbraco 7.4 URL Redirect Feature

Is there an available URL redirect for Umbraco 7.4? I mean I'm aware that there is a URL Redirect Management Tools in Umbraco 7.5 but we are using the lower version and it doesn't have that. Is there a way to achieve the same result? The scenario is this.
We created an web.com/about-us page. Now this is cached in google search now.
We then decided to change about-us to corporate now the cached version is still pointing to about-us where in fact the new URL now is web.com/corporate
How can I achieve a URL redirect? If someone manually typed or clicked on the cached url like about-us how can Umbraco 7.4 redirects it to the correct site? Would appreciate a step by step process if possible since I'm still new in Umbraco
you can use something like SEO Checker to manage this for you - there are also other plugins available that can do the redirection management.
https://our.umbraco.com/packages/website-utilities/seo-checker
As my first post has been hidden due to lack of detail, which is understandable, I am adding this new answer with more details.
We use UrlTracker for our projects - it is a nuget package that you install and then you can start using it. This can help.
The Url Tracker is used to manage URLs within umbraco and it automatically tracks URL changes, for instance when a node is renamed, this makes sure the old URL will redirect to the new location. Using this; you can also create your own redirects, based on a simple URL or using a Regex pattern. This is especially handy while migrating existing indexed URLs to your new website.
Please check this umbraco package web page for more details. Alternative links can be found below, hope this helps.
https://24days.in/umbraco-cms/2013/sharing-is-caring/
https://www.marceldigital.com/blog/2017/08/5-umbraco-seo-packages-you-need-right-now

How to configure a site so that I can have a url without directory the way Wordpress did?

Say I made a website with Wordpress, and created a few pages say www.foo.com/bar1 and www.foo.com/bar2. I have no idea where they stored this, since there is no /bar1 and /bar2 directory. Unlike when I created a site from scratch and added new directories like /public_html/bar1.
So how do I configure it like this without Wordpress?
It depends on the technology\framework you're using. Google 'Routing'.
Example for Asp.Net: https://msdn.microsoft.com/en-us/library/cc668201.aspx
When you create a page using WordPress, your all page will have a dynamic content with same layout from page.php file which is a mandatory file of a theme and served according to the routes. You will not see the page.php in URL or page. WordPress saves your page title in database and servers it accordingly (check the permalink section of WordPress).
When you create a custom site from scratch you can do the same by creating a file and re-use it according to the routes. You don't need directory for that.
Note: File extensions like .php .html are removed using .htaccess file.
Maybe you can use a framework like ZK framework to create a div content and refresh it according to the request. This way, you may not have to update any url in your application. You just refresh an inner div by dynamicaly including a new view.
Maybe this would help:
https://www.zkoss.org/wiki/ZK_Component_Reference/Essential_Components/Include

Joomla base URL incorrectly formulated

Somehow my Joomla after an upgrade from 3.4.7 to 3.4.8 is not formulating the base URL properly. The base is supposed to be "www.domain.com/en-us/" for the English version of the site. It renders the following as the base url "www.domain.comhttp://www.domain.com/en-us/www.domain.com/"
further rendering the following url for resources, such as for "green_leaf.png": "www.domain.comhttp://www.domain.com/en-us/www.domain.com/images/green_leaf.png". Consequently, the pages full missing page elements.
SEF is enabled. Multi Language Filter Plugin is enabled. Any ideas what could be the cause of this besides, the configuration and the htaccess files? Those file are pretty standard.
The first things I would confirm are
- in system > global configuration > site -- is URL rewriting set to yes and have you renamed htaccess to .htaccess?
- if yes then ftp to your site, open configuration.php in a text editor, locate the line setting the $live_site variable and change to
public $live_site = 'http://www.domain.com';
Good luck!
I have tried your suggestion, to specify the $live_site variable in the configuration.php file as you indicate, even though I have also been recommended to leave it empty. The results were the same, the issue remains.
Here is the latest on this matter:
I have created a local copy of the site on my machine from a backup that was still Joomla 3.4.7. The same issue appears. I have reverted back to an earlier backup with Joomla 3.4.6 version of the site, and the site's page was restored to normal. This is with the same exact .htaccess and configuration.php across the 3 Joomla versions.
I have also tried with "Options +FollowSymLinks" commented out in the .htaccess file that came with J3.4.8. On both the live hosted site and a locally hosted copy, same exact results, namely:
Using Google Chrome (with Language Filter Enabled and set to Remove URL Language Code)
On the live hosted site:
www.domain . comhttp://www.domain.com/www.domain.com/
On the localhost copy of the site: localhost/domainfolder/localhost/domainfolder/http://localhost/domainfolder/localhost/domainfolder/domainfolder
So this issue might be pertaining to Joomla versions 3.4.7 and 3.4.8. The challenge is that 3.4.6 also has critical security vulnerabilities.
Also tried with Language Filter Disabled - Same result (Base URL formulated as above) with the difference that all the languages are displayed at the same time on the home page with the resources that are not found because of the faulty base url.

Sitecore 6.5 rev. 120247 media urls adding a leading slash

To be able to use Edgecast CDN, we had to write a custom media provider which worked well with before the site was upgraded from 6.5 rev 111230 to 120427. After the upgrade, none of the images showed up on the website. I debugged the code and found a probable cause. In the upgrade following fix was included -
By default, media URLs will now be generated relative to the site root (such as /~/media/images/picture.ashx or /virtualFolder/~/media/picture.ashx) instead of relative to the current page. Such URLs are considered SEO friendly, and also improve caching. (346213, 332285)
This is now adding a leading slash "/" at the beginning of the media urls. So urls are not getting generated as "//mediaserver/abc.jpg". The 'MediaUrlOptions.VirtualFolder" is being set to "/" by default. I want to confirm that this is the issue and also if I can override this in code but I want to find out if this can be controlled from the config file instead of making this change in the code.If this is not the issue then how can I fix this problem?
In the interest of providing the answer here:
Remove the slash in the Media.MediaLinkPrefix setting due to Sitecore automatically adding it now:
<setting name="Media.MediaLinkPrefix" value="/mediaserver" />
As well as in the following one:
<handler trigger="/mediaserver/" handler="sitecore_media.ashx" />
Also, Media API improvements have been made since version 6.5.0 rev. 120427. Now it is possible to elegantly override the MediaProvider class using a web.config setting per reference number 312358 in release notes on the SDN:
http://sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%206/ReleaseNotes/ChangeLog.aspx

Resources