Results 1 to 9 of 9

Thread: Bug with folderurl and Contao 2.11RC2

  1. #1
    New user
    Join Date
    07-16-09.
    Location
    Lausanne, Switzerland
    Posts
    8

    Default Bug with folderurl and Contao 2.11RC2

    This extenstion seems to be completely incompatible with the new version of Contao:
    - in the backend, it automatically adds an "http://" in front of the alias when saving a page
    - in the frontend, it's impossible to access a page whith an alias containing a "/"
    Please correct this quickly!

  2. #2
    Experienced user
    Join Date
    08-21-09.
    Posts
    563

    Default Re: Bug with folderurl and Contao 2.11RC2

    I'm not sure about the "http://" issue, I didn't see that when I was testing. But I was using RC1 at the time, so maybe its new. I do know that folderurl is definitely not compatible with the new "auto_item" feature added.

    Make sure in your settings (frontend configuration) that "Use the auto_item parameter" is unchecked and see if it helps at all. This actually might be a big deal. What Contao is doing with the "auto_item" is counting the number of parameters after the URL (to us, the stuff between the "/"s).

    So if it sees "myurl.com/something/" it sees one pararameter and assumes it's a page. But if it sees "myurl.com/something/something-else/" it sees 2 parameters, and treats the first as a page and the second as an item alias and tries to stick "items/" or "events/" in between them.

    So this will obviously break the folderurl extension any time you try to nest folders in your alias. And not being much of a developer I don't know if there's an easy fix for it, or if we just won't be able to use the two together.

    P.S. It's worth noting that folderurl is actually only officially compatible with up to 2.9.5, as listed in the repository. So I wouldn't classify this as a bug either.
    Brian

  3. #3
    User
    Join Date
    01-20-11.
    Location
    Germany
    Posts
    77

    Default Re: Bug with folderurl and Contao 2.11RC2

    Hello,

    Quote Originally Posted by cbadoud
    Please correct this quickly!
    I guess that Andreas (the extensions author) will have to do many changes to forderurl with Contao 2.11. If you need this quickly you might consider paying him the development time so he will be able to do this with high priority.

    Jan
    Free support only here in the forum.
    Please report bugs for my extensions using http://www.contao-forge.org. Thanks!
    Requests for Contao support and development please send mail to jan@theofel.de

  4. #4
    New user
    Join Date
    07-16-09.
    Location
    Lausanne, Switzerland
    Posts
    8

    Default Re: Bug with folderurl and Contao 2.11RC2

    Thank your for your answers, I will think to make a contribution to Contao Verein, but I'm not sure that it was the thing you mean by "paying the developper"

    Indeed, the problems disappears when disabling the "auto_item" parameter! So thank you "Medianomaly"!

    Anyway, I've noticed another thing: I wanted to have URL ending with "/index" when the page corresponds to the root of a chapter, but the result is that the word "index" is automatically removed in frontend, which produced a "page not found" error. Note that this thing worked with with Contao 2.10.

  5. #5
    User taca's Avatar
    Join Date
    06-20-09.
    Location
    Kyoto, Japan
    Posts
    111

    Default Re: Bug with folderurl and Contao 2.11RC2

    Hi.

    I've checked some code and found that idnaEncodeUrl() in System class has changed to prepend "http://".
    So, prepending "http://" problem could be solved with this change:

    Code:
    --- folderurl/FolderURL.php.orig	2011-02-17 23:19:34.000000000 +0900
    +++ folderurl/FolderURL.php	2012-02-22 17:56:16.000000000 +0900
    @@ -84,6 +84,8 @@ class FolderURL extends Controller
     	
     	public function generateFolderAlias($varValue, DataContainer $dc)
     	{
    +        $varValue = str_replace(array('http://', 'https://'), '', $varValue);
    +
     		if (!strlen($varValue) && ($GLOBALS['TL_CONFIG']['folderAlias'] || (strlen($GLOBALS['TL_CONFIG']['languageAlias']) && $GLOBALS['TL_CONFIG']['languageAlias'] != 'none')))
     		{
     			$this->import('Database');
    I tested with Contao 2.11.0. 'https://' pattern shouldn't need and it wouldn't fix "auto_item" related problem.

    Best regards.
    --
    Takahiro Kambe

  6. #6
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Bug with folderurl and Contao 2.11RC2

    Just add this to your system/config/dcaconfig.php file and the problem disappears...

    Code:
    $GLOBALS['TL_DCA']['tl_page']['fields']['alias']['eval']['rgxp'] = '';

  7. #7
    New user
    Join Date
    08-22-12.
    Posts
    8

    Default Re: Bug with folderurl and Contao 2.11RC2

    Or you use the alternative, RealURL. The unofficial replacement:

    http://contao.org/en/extension-list/view/realurl.html

  8. #8
    Experienced user
    Join Date
    08-21-09.
    Posts
    563

    Default Re: Bug with folderurl and Contao 2.11RC2

    Hey,

    I saw RealURL (and another -- TrueURL I believe) in the repsitory and meant to give them a spin.

    Do you know if either are compatible with auto_item? Not even sure it''s possible, but just wanted to ask.
    Brian

  9. #9
    New user
    Join Date
    08-22-12.
    Posts
    8

    Default Re: Bug with folderurl and Contao 2.11RC2

    Hi,

    RealURL is compatible with auto_item and auto_language. TrueURL is a fork from RealURL and also compatible with both functions.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •