Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Martin

    (@siredward)

    I have just noticed that version 2.0.3 is already available. Now the multisite language switcher works perfectly on my website. Thank you very much for your great work!

    Thread Starter Martin

    (@siredward)

    Thank you very much! Your commit 5975b69 looks very promising. I’m going to test version 2.0.3 as soon as it is available.

    • This reply was modified 5 years, 11 months ago by Martin.
    Thread Starter Martin

    (@siredward)

    Yes, it is a page: https://kaseto.com/de/download/

    • This reply was modified 5 years, 11 months ago by Martin. Reason: Added link to the page
    Thread Starter Martin

    (@siredward)

    Thank you very much! Now I can use version 2.0 without getting any compiler error.

    However, I found a strange bug: lloc\Msls\MslsOptions::create()->get_permalink($language) seems to work for every language but en_US.

    For example:

    de_DE: https://kaseto.com/de/download/ (correct)
    fr_FR: https://kaseto.com/fr/telecharger/ (correct)
    en_US: https://kaseto.com/ (wrong, should be https://kaseto.com/download/)

    $blogs = lloc\Msls\MslsBlogCollection::instance()->get_objects();
    if ($blogs)
    {
    	$options = lloc\Msls\MslsOptions::create();
    	$currentID = lloc\Msls\MslsBlogCollection::instance()->get_current_blog_id();
    
    	usort($blogs, function($a, $b)
    		{
    			return strcmp($a->get_description(), $b->get_description());
    		}
    	);
    
    	echo '<ul>' . PHP_EOL;
    
    	foreach ($blogs as $blog)
    	{
    		if ($blog->userblog_id == $currentID)
    		{
    			echo '<li class="active"><a href="' . $options->get_current_link() . '" hreflang="' . $blog->get_alpha2() . '" rel="alternate">' . $blog->get_description(). '</a></li>' . PHP_EOL;
    		}
    		else
    		{
    			switch_to_blog($blog->userblog_id);
    			$language = $blog->get_language();
    			echo '<li><a href="' . $options->get_permalink($language) . '" hreflang="' . $blog->get_alpha2() . '" rel="alternate">' . $blog->get_description(). '</a></li>' . PHP_EOL;
    			restore_current_blog();
    		}
    	}
    
    	echo '</ul>' . PHP_EOL;	
    }
    Thread Starter Martin

    (@siredward)

    Yes, I just migrated from msls_head() to wp_head(). It works with both versions (1.0.8 and 2.0), but I get much more header entries than I want. I haven’t used wp_head() before, because WordPress outputs much header entries that I neither need nor want.

    My next problem is that some of my theme functions use MslsBlogCollection and MslsOptions. Which classes can I use instead in version 2.0?

    Thread Starter Martin

    (@siredward)

    My theme calls msls_head() to generate the alternative links in the header:

    <link rel="alternate" hreflang="de" href="https://kaseto.com/de/" title="Deutsch" />
    <link rel="alternate" hreflang="fr" href="https://kaseto.com/fr/" title="Fran?ais" />
    <link rel="alternate" hreflang="it" href="https://kaseto.com/it/" title="Italiano" />
    <link rel="alternate" hreflang="ru" href="https://kaseto.com/ru/" title="Русский" />
    <link rel="alternate" hreflang="en" href="https://kaseto.com/" title="English" />
    Thread Starter Martin

    (@siredward)

    My shared host provider doesn’t provide any PHP error logs. Therefor I have set up a local XAMPP with WordPress. There I could reproduce the error as long as all mentioned plugins were enabled before I finally enabling WP Editor:

    Warning: fopen(xxx\xampp\htdocs\wordpress/wp-content/plugins/plugins//wpeditor.php): failed to open stream: No such file or directory in xxx\xampp\htdocs\wordpress\wp-includes\functions.php on line 4568

    Warning: fread() expects parameter 1 to be resource, boolean given in xxx\xampp\htdocs\wordpress\wp-includes\functions.php on line 4571

    Warning: fclose() expects parameter 1 to be resource, boolean given in xxx\xampp\htdocs\wordpress\wp-includes\functions.php on line 4574

    Warning: require_once(xxx\xampp\htdocs\wordpress/wp-content/plugins/plugins/classes/WPEditor.php): failed to open stream: No such file or directory in xxxs\xampp\htdocs\wordpress\wp-content\plugins\wp-editor\wpeditor.php on line 77

    Fatal error: require_once(): Failed opening required ‘xxx\xampp\htdocs\wordpress/wp-content/plugins/plugins/classes/WPEditor.php’ (include_path=’xxx\xampp\php\PEAR’) in xxx\xampp\htdocs\wordpress\wp-content\plugins\wp-editor\wpeditor.php on line 77

    Afterwards I disabled all other plugins and I could successfully enable WP Editor. I’m using PHP 5.6.21.

    Thread Starter Martin

    (@siredward)

    The problem is reproducible: As soon as I activate WP Editor, the frond-end and back-end are not anymore accessible due to an error 500 and I have to remove WP Editor via FTP. I don’t understand why activating WP Editor breaks even the front-end of WordPress. Unfortunately my web hosting service does not provide any useful logs.

    Thread Starter Martin

    (@siredward)

    Thanks for your reply. I cannot access the site at all anymore. So there is no way to deactivate any plugins via the dashboard. I will try to rename the plugin folders via FTP.

Viewing 9 replies - 1 through 9 (of 9 total)