bednee / cooluri

GIT repository for TYPO3 extension CoolUri
7 stars 12 forks source link

Something different with URL generation between 1.1.3 and 1.1.4 #82

Closed robofant closed 6 years ago

robofant commented 6 years ago

It's a bit complicated to explain. Since 1.1.4 there is an extra section in the URL, generated from the name of the root level page.

Let me make some examples. before: http://wwww.example.org/ after: http://www.example.org/name-of-root-level-page.html

before: http://wwww.example.org/foo/bar.html after: http://wwww.example.org/name-of-root-level-page/foo/bar.html

It is a TYPO3 7.6 project, I only upgraded CoolURI from 1.1.3 to 1.1.4 and did not change the config file. After downgrade to CoolURI 1.1.3 everything is fine again.

But now I have a TYPO3 8.7 project and cannot use CoolURI 1.1.3. How can I deal with this weird behaviour of CoolURI 1.1.4?

bednee commented 6 years ago

Hi, how does your structure look like? In order to have rootpage without name, the stucture should look like

-Root (regular page) -- Home (shortcut to root)

Jan

robofant commented 6 years ago

Yes, this is my structure. But the root page has a name (the same name as the home page) for some reason. I don't know the reason anymore. But this was never a problem with 1.1.3 and earlier.

robofant commented 6 years ago

Ok, I found the problem. Here is the fix.

CoolUri.php.diff.txt

bednee commented 6 years ago

I believe that your patch is not correct. Have a look at the commit I've just made - https://github.com/bednee/cooluri/commit/781866b9e238eb6b483bcea125bd9d0d7c563e57 - that's how it should be I believe. Please check it out and let me know. Thanks.

robofant commented 6 years ago

I just compared 1.1.3 and 1.1.4 and changed back one little thing. It worked for me. I tested your fix and can confirm it works. Thank you.

robofant commented 6 years ago

Ok, one thing. In CoolURI I did: DELETE EVERYTHING AND START AGAIN, then I cleared the frontend cache. And then there were a lot of warnings in the system protocol.

TYPO3 7.6.25: Core: Error handler (FE): PHP Warning: Illegal string offset 'num' in /html/typo3conf/ext/cooluri/Classes/Integration/CoolUri.php line 552

TYPO3 8.7.11: Core: Error handler (FE): PHP Warning: Illegal string offset 'num' in /html/typo3/typo3conf/ext/cooluri/Classes/Integration/CoolUri.php line 415

bednee commented 6 years ago

You're right, my bad. Your patch was correct.