[Gelöst] Enfold Theme - Codeblock handles CSS - doesnt work in translation
Dieses Thema ist gelöst. Hier finden Sie eine Beschreibung des Problems und der Lösung.
Problem: The client has created a page in German and translated it into English using WPML Translation Management. However, the custom CSS that works on the German page does not apply on the English page. Solution: First, ensure that all URLs in your database, including those for fonts and other resources, are updated from HTTP to HTTPS. This can be done using a search-and-replace operation in the database. Additionally, check the order in which the custom CSS is loaded. On the German page, the CSS loads after the
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific case, we recommend opening a new support ticket. We also highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum at https://wpml.org/forums/forum/english-support/.
Dies ist das technische Support-Forum für WPML – das mehrsprachige WordPress-Plugin.
Mitlesen können alle, doch nur WPML-Kunden können hier Fragen veröffentlichen. Das WPML-Team antwortet im Forum an 6 Tagen pro Woche, 22 Stunden am Tag.
Hintergrund des Themas:
Ich habe folgende Unterseite erstellt: versteckter Link und mittels dem WPML Translation Managment diese Englisch Übersetzung angelegt: versteckter Link. Im deutschsprachigen original handelt ein Codeblock lokales CSS für diese Seite.
Die Symptome:
In der englischen Übersetzung wird der Block zwar dargestellt, greift aber nicht.
könnten Sie bitte den genauen CSS-Code posten? So kann ich im Quellcode der Seite prüfen, ob Klassen oder IDs möglicherweise durch die Übersetzung verändert wurden.
Danke für die Info. Der einzige Unterschied, den ich sehe, betrifft nur die Schriftart selbst. Ist dies korrekt? Die wird aus einem anderen Grund nicht geladen:
Mixed Content: The page at '<em><u>versteckter Link</u></em>' was loaded over HTTPS, but requested an insecure font '<em><u>versteckter Link</u></em>'. This request has been blocked; the content must be served over HTTPS.
Es wird somit geblockt, da das Request ohne SSL durchgeführt wird.
Yeah but how can that be? Its the same font on the same server and the code works perfect in the german version but not in the english one? does wpml meed to dulplicate fonts?
Yeah, but how is that possible? It’s the same font, hosted on the same server, and the code works perfectly in the German version but not in the English one. Does WPML need to duplicate fonts?
No, the request is coming from your theme, not WPML. Somewhere, the call is still being made over HTTP instead of HTTPS. This is something you might want to check with Enfold support, as it affects not only fonts but also your site's favicon.
You can easily fix this by running a search-and-replace in the database to update any remaining HTTP URLs to HTTPS.
Plus I dont even use that font in thet site.
Yeah, it's actually the "Anton" font being used. The issue is that the custom CSS is loaded before the <body> tag starts. On the German page, however, it’s loaded after the <body> tag is active.
Compare the source code on
Line 56: view-source:versteckter Link
Line 46: view-source:versteckter Link
Do you use this function from Enfold versteckter Link?