Realurl | Fork of https : //svn.typo3.org/TYPO3v4/Extensions/realurl/
kandi X-RAY | Realurl Summary
kandi X-RAY | Realurl Summary
Fork of https://svn.typo3.org/TYPO3v4/Extensions/realurl/ with the patchset from AOEmedia
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Show unique alias
- Decodes a SPURL URL
- Convert page path parts to a unique ID .
- check if there is a shortcut page
- Do the configuration
- Get the configuration for a domain .
- Stores a page in the cache
- Convert page path to id
- insert a page in cache
- Generate page browser
Realurl Key Features
Realurl Examples and Code Snippets
Community Discussions
Trending Discussions on Realurl
QUESTION
I have created a custom Typo3 v9.5.26 extension using the Extension Builder extension.
My extension resides in typo3conf/ext/xyz_sortitems and sorts items.
An item has the attributes itemid, name, date and amount.
My ext_localconf.php looks like this:
...ANSWER
Answered 2021-May-09 at 12:21Based on your question this are the explanations of the values.
QUESTION
I have a function to filter results by several params, such as name
, status
, type
and date range (startDate
and endDate
). I would like to be able to filter results by these params together, but only if they are present, i. e. I can pass name
and status
, but don't pass type
. I don't know how to do this with a date range. Now the filter is working only if I pass startDate
and endDate
, in all other cases, even if other params are present and there is corresponding data in the array, it returns null. How can I make startDate
and endDate
optional?
Here is my filter:
...ANSWER
Answered 2021-Feb-11 at 17:05function getPresentParams(param, checkList) {
// we start with an empty Array
let output = [];
// for each item in checkList
checkList.forEach(item => {
// if the item is an array, multiple params are needed
if (Array.isArray(item)) {
// the item is an itemList
let allItemsPresent = true;
for (const itemListItem of item) {
// if one of the list is not there
if (!param.hasOwnProperty(itemListItem)) {
allItemsPresent = false;
// then stop the loop
break;
}
}
// else all are matching
if (allItemsPresent) {
// add all to our output
output.push(...item);
}
}
// else if the item is not an Array
else {
// simple check if the param is present
if (param.hasOwnProperty(item)) {
output.push(item);
}
}
})
return output;
}
const params = {type: "car", color:"red", tires:4};
// any of "type", "tires" or "windows" should be searched
console.log(getPresentParams(params, ["type", "tires", "windows"]));
// output is ["type", "tires"]
// only show matches with "color" AND "type"
console.log(getPresentParams(params, [["color", "type"]]));
// output is ["color", "type"]
// show matches with "color" or ["windows" AND "tires"]
console.log(getPresentParams(params, ["color", ["windows", "tires"]]));
// output is ["color"]
QUESTION
I'm using ProTable in Ant Design Pro. The dataSource for the table is received by API from the server. If the user is not an admin, I filter the dataSource by his userid
. The problem is that I can't get the actual count of total pages for both cases (admin and user).
Here is the code for my API request function:
...ANSWER
Answered 2020-Nov-15 at 09:53The total
should be an assignment, not a function:
QUESTION
I'm using a website running TYPO3 6.2 with Realurl extension.
In the tree I created a "Cars" page with ID #66 and with "cars/" as speaking url path segment. My page is now available with https://www.mywebsite.com/cars/
. Cool.
What I need, if going on https://www.mywebsite.com/cars/audi
, is to retrieve the audi
as a GET variable (GP:car_brand) in Typoscript but current Typo3 default behavior is to search for a audi
page below the existing cars
page... and then display a 404 error.
What I have already tried:
1/ Adding a RewriteRule inside the .htaccess: RewriteRule ^cars/(.*)$ /index.php?id=66&car_brand=/$1 [P]
. It works but the user is redirected to https://www.mywebsite.com/cars/?car_brand=audi
, and we really need to keep the cars/audi/
URL scheme which is more SEO compliant / user friendly.
2/ Adding custom configuration inside my realurl_conf.php postVarSets but realurl is very hard to understand and I don't have the technical skills to deal with it:
...ANSWER
Answered 2020-Sep-25 at 08:00May be you can try something like this :
QUESTION
I would like to use the realurl memory of expired url to generate 301 for sites upgraded to TYPO3 9+ and avoid 404.
For example, before TYPO3 9, fetching /my-old-page
redirected to /my-new-page
, because /my-old-page
was still in the realurl database table.
Now, since the migration to TYPO3 9, fetching /my-old-page
throws a 404.
TYPO3 9 ships an upgrade wizard which transforms realurl pagepath/aliases into slugs, but does not transforms realurl's expired pagepath/aliases into sys_redirect
.
What would be the best strategy to keep the realurl memory of redirects:
- Migrate all expired url/alias to sys_redirect? This can leads to a big sys_redirect table, with performance issues
- Run a middleware after the RedirectHandler that searches for expired url and triggers a 301 if found? This will make an extra db query for each request.
- Create a PageNotFoundHandler which searches for expired url if page is not found? TYPO3 allows only one ErrorHandler per status code so it can be an issue
- List the redirects in the .htaccess
By "best strategy" I mean :
- the performance could be important (I have more than 10,000 expired urls)
- if possible the redirects should be maintainable by an editor (like sys_redirect)
Thanks for your insights!
...ANSWER
Answered 2020-Sep-22 at 11:32For the following, I am assuming you use Apache Webserver and have access to the webserver configuration under /etc/apache2, for example.
I don't have any numbers but I assume redirects you handle in the webserver are more efficient than firing up PHP and TYPO3. Disadvantage is the redirects get evaluated also for static assets (unless handled elsewhere, e.g. cdn). Also, this cannot be maintained by the editors. But, if you are migrating from realurl, for example, you can use this solution via Apache as temporary solution and take it down after a while.
However, this can get unmaintainable and quite ugly if you have a lot of redirects.
Sites I have seen had often accumulated redirects over the years, often happily mixing RewriteRule, Redirect (or redirect), RedirectMatch and RewriteCond thrown in for good measure. To keep that nice and clean I have 2 suggestions (which have both been used in sites I maintained):
Maintain the redirects in the configuration management system (e.g. angular, SiteStack). Do not write the redirect statements there, but just add the URLs and let your states (or whatever the CM calls them) write them for you
Use RewriteMap and a file consisting of the URLs.
For both solutions, you usually have redirects of (at least) 2 types:
- exact redirects, e.g. you want to redirect /abc/def to /new/def, but not for example /abc/def/subpage
- regex or wildcard redirect, e.g. you want to redirect /abc/* to /new/*
Both can be handled with appropriate RewriteRule statements, but they look differently. For solutions 1 and 2 you need to handle these separately.
Example 1 (regex redirect):
QUESTION
I have a custom extbase extension that queries read-only data from a ReST service to show it in a list and detail view. There is no data in a TYPO3 table. The URLs were processed by realURL, and this worked fine up until TYPO3 8.
Now that I'm in the process of updating to TYPO3 9.5.21 I can't get the routeEnhancer configuration for this extension to work. I managed to get the exact same URL for detail views on TYPO3 9, but the detail view returns a 404 error: "TYPO3\CMS\Core\Error\Http\PageNotFoundException: The requested page does not exist"
This is the config.yaml:
...ANSWER
Answered 2020-Sep-21 at 10:01maybe your data sysfolder is out of the root page pagetree. See here: https://forge.typo3.org/issues/91235
QUESTION
First of all, I have to deal with a project-related upgrade of a TYPO3 version and am also relatively new to the Nginx web server.
I have upgraded a TYPO3 installation from version 7.6-LTS to 8.7-LTS and transferred the site from an IIS (Windows) server to an Ubuntu 18.04 system with Nginx.
I have now discovered the following: the first click on an internal link on the website in the menu e.g. domain.com/prices
works correctly. The URL domain.com/prices
is called and also shown in the URL. Now when the page has been reloaded, the same menu item link now looks like this...
ANSWER
Answered 2020-Jul-30 at 18:21Ok. Now I found the solution. As I wrote in the comments it was the config setting:
QUESTION
I'm migrating realurl configuration for extension news to route enhancers. The realurl configuration is a mix of fixedPostVars
and postVarSets
. Therefore speaking urls of news single views are build in two different ways:
- https://example.org/my-news-list-page/single-view-page/my-news-title
- https://example.org/my-news-list-page/single-view-page/news/my-news-title (including a
postVarSets
prefix named news)
Now with route enhancers I would like to have all links built without the prefix but still be able to resolve links with or without the prefix.
In my route enhancers configuration I added the following two routePaths in this exact order which seems to work just fine:
...ANSWER
Answered 2020-Jul-08 at 08:15This should work.
If you are not redirecting you should think about duplicate content. I would check if EXT:seo is adding the correct canonical URL (which should be the first matching route) in order to make search engines are happy.
Yet I think this is a bit uncharted territory. Personally I would add a simple generic redirect to your webserver.
QUESTION
Is it possible to disable the speaking urls for logged in frontend users in TYPO3 9 or 10? With ext:realUrl
this was easily possible with the following typoscript:
ANSWER
Answered 2020-Jun-23 at 21:35It's not possible to turn off routing in TYPO3 v9 or v10.
See here: Disable Routing in TYPO3 9
QUESTION
I am working on a ReactJS project. Here I am facing an issue with react-router-dom
. After a few navigations, my screen whites out.
Following is my Router.js file:
...ANSWER
Answered 2020-Apr-25 at 22:27For routing on a ReactJS SPA (Single Page Application) you should use the Link
component of react-router-dom
but in your code I just see you use anchor tags. there is an only
tag that its
to
prop is an empty string! pay attention to this part of your code:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Realurl
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page