lieke_d
Forum Replies Created
-
Forum: Plugins
In reply to: [Multisite Language Switcher] Fatal errorHmm, it seems like the connection between blog 1 and blog 2 had disappeared, although blog 3 still linked to both other blogs just fine.
Reconnecting helped – I guess I’ll just have to connect all posts and pages manually now.
Problem solved – thanks a LOT for your help and patience.
Forum: Plugins
In reply to: [Multisite Language Switcher] Fatal errorThanks – it works almost perfectly now. There’s a small issue with the hreflang & cross-linking.
Blog 1: only links to blog 2
Blog 2: only links to blog 1
Blog 3: links to both blog 1 and 2Any idea what might be causing this?
Forum: Plugins
In reply to: [Multisite Language Switcher] Fatal errorYes, that is correct.
Forum: Plugins
In reply to: [Multisite Language Switcher] Fatal errorYes, you’re right – it did. The (double) hreflang tags are gone when that’s commented out.
What I forgot to mention (or actually didn’t realize until just now) is that all three blogs use different themes. It’s basically the same theme, but with different tweaks for each blog. I’m not sure if that makes any difference?
Forum: Plugins
In reply to: [Multisite Language Switcher] Fatal errorJust tried that – I don’t see any changes or consequences.
Forum: Plugins
In reply to: [Multisite Language Switcher] Fatal errorThe entire function, from [function my_print_something()] to the end?
Forum: Plugins
In reply to: [Multisite Language Switcher] Fatal errorI cannot help if I don’t get answers 😉
I thought I did that with “That is correct.” 🙂
Commenting out that line got rid of the error popping up when trying to edit/ save a post. It also returned the hreflang-tag on the home page of the default blog. The home pages of blog id 2 and 3 now have a double hreflang reference – both to the domain itself.
Cross post references (both links and hreflang connections, between interlinked posts and pages) still aren’t present.
Forum: Plugins
In reply to: [Multisite Language Switcher] Fatal errorThat is correct. The default blog has id 1, the other two blogs are correctly connected via Network -> Settings -> Domains
Forum: Plugins
In reply to: [Multisite Language Switcher] Fatal errorThere’s this:
} function my_msls_blog_collection_get( $arr ) { $arr = array(); foreach ( array( 1, 2, 3, ) as $id ) { $arr[$id] = get_blog_details( $id ); } return $arr; } add_filter( 'msls_blog_collection_construct', 'my_msls_blog_collection_get' ); function my_print_something() { $blogs = MslsBlogCollection::instance(); $mydata = MslsOptions::create(); foreach ( $blogs->get_objects() as $blog ) { $language = $blog->get_language(); if ( $blog->userblog_id == $blogs->get_current_blog_id() ) { $url = $mydata->get_current_link(); } else { switch_to_blog( $blog->userblog_id ); if ( 'MslsOptions' != get_class( $mydata ) && !$mydata->has_value( $language ) ) { restore_current_blog(); continue; } $url = $mydata->get_permalink( $language ); restore_current_blog(); } $language = substr( $language, 0, 2 ); printf( '<link rel="alternate" hreflang="%s" href="%s" />', ( 'us' == $language ? 'en' : $language ), $url ); } }Neither this code nor the language settings had changed around the time that the errors occured for the first time, though.
Forum: Plugins
In reply to: [Multisite Language Switcher] Fatal errorI’m not sure, it’s been a while since I installed the plugin for the first time. How can I check that?
Forum: Plugins
In reply to: [Multisite Language Switcher] Fatal errorThe plugin is network-active and I didn’t add any new sites.
Forum: Plugins
In reply to: [Multisite Language Switcher] Feature request: hreflang supportAwesome, that code works like a charm. Thank you very much.
Forum: Plugins
In reply to: [Multisite Language Switcher] Connecting blogsMy bad, it was a wrong setting indeed.
Forum: Plugins
In reply to: [Multisite Language Switcher] Connecting blogsIt links to the subdomain in stead of the mapped domain now, though. Is there a way to fix that?
Forum: Plugins
In reply to: [Multisite Language Switcher] Connecting blogsIt worked like a charm, thanks for your help!