We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16601
    • 13 Posts
    I’m trying to make furl work with non english letters,

    I tried to code that plugin, so non english letter will not be removed from alias:

    /**
     * @name FURL with UTF8
     * @desc Handle the task of FURL with UTF8 characters
     * @license Public domain
     */
    
    /*
     * Initialize parameters
     */
    if (!isset ($alias)) { return ; }
    /*
     * Handle events
     */
    $e =& $modx->event;
    switch ($e->name ) {
        case 'OnStripAlias':
    
                $alias = strip_tags($alias); // strip HTML
                $alias = preg_replace('/\s+/', '-', $alias); // convert white-space to dash
                $alias = preg_replace('/-+/', '-', $alias);  // convert multiple dashes to one
                $alias = trim($alias, '-'); // trim excess
                $alias = rawurlencode($alias); //utf8_encode
    
    
                $e->output($alias);
                $e->stopPropagation();
            break ;
        default:
            return ;
    }


    in the plugin tab i checked the OnStripAlias event checkbox,
    and disabled the TransAlias plugin (if someone use it he can combine them in the same function).

    I get that error message when i go to that page:

    ERROR: Too many forward attempts!

    I think it could be also problem with htaccess config.

    thanks for any idea or help about that.






      • 16601
      • 13 Posts
      I can see now that in MODx 1.0.2 have better support for this...