• Resolved Pengux

    (@pengux)


    When using the widget for subscription form on a sub page (e.g. “/contact-us”), the URL of the form’s action becomes “/contact-us/wp-admin/admin-ajax.php” which is incorrect.

    I’ve traced the code to the this block (line 201-214) in knews.php:

    if ((KNEWS_MULTILANGUAGE) && $knewsOptions['multilanguage_knews']=='wpml') {
    	if (function_exists('icl_get_languages')) {
    
    		global $sitepress_settings;
    		if (isset($sitepress_settings['language_negotiation_type']) && $sitepress_settings['language_negotiation_type']==2) {
    
    			$l = $this->pageLang();
    			$knews_localized_url = $l['url'];
    			if (substr($knews_localized_url, -1) != '/') $knews_localized_url .= '/';
    			$knews_localized_admin = $knews_localized_url . 'wp-admin/';
    			$knews_localized_url .= 'wp-content/plugins/knews';
    		}
    	}
    }

    I assume that this is because WPML is in the language mode with one domain per language that cause this.

    http://wordpress.org/extend/plugins/knews/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author creverter

    (@creverter)

    Please, can do you give me access to your wp-admin? contact at knewsplugin dot com.

    Sorry for the delay,
    Carles Reverter.

    Plugin Author creverter

    (@creverter)

    Hello,

    can do you try this change:

    //The old lines:
    //$l = $this->pageLang();
    //$knews_localized_url = $l[‘url’];
    //The new line:
    $knews_localized_url = icl_get_home_url();

    Kind regards,
    Carles Reverter.

    Plugin Author creverter

    (@creverter)

    New releases have this patch.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Wrong action URL for subscription form with WPML in domain per language mode’ is closed to new replies.