Home › Forums › WoodMart support forum › HTML BLock not working with WPML
HTML BLock not working with WPML
- This topic has 13 replies, 2 voices, and was last updated 6 years, 5 months ago by Elise Noromit.
-
AuthorPosts
-
May 21, 2018 at 12:03 pm #58655
mrvintervindParticipantHello, noticed a huge bug. Is´t when I´m using HTML Blocks in the woodmart core plugin.
The problem occours when I use permalinks för a menu link and it convert for example “/en/crossmedia” to a id url “/?page_id=228” and to the primary language and not the /en/ folder. It´s very wierd and tested to deactivate plugins etc. The problem are just with the HTML Blocks.May 21, 2018 at 4:58 pm #58698
Elise NoromitMemberHello,
I tried to test the issue on our developing site and cannot reproduce the issue.
Please describe your action step by step. How do you use HTML blocks in core plugin?
Please check your configuration in Settings > Permalinks, make sure you have not set “Plain”
Here is instruction how to translate HTML block correctly:
1/ You need to create a separate HTML block with the translation for example [html_block id="212"] On this stage you insert proper links. For example, you have source page crossmedia and target page en/crossmedia so in the translated block you need to insert en/crossmedia
2/ Then you navigate to WPML > String Translation and search [html_block id="212"] as shown here: https://gyazo.com/2bf5bceafe57908bca0cc4b18bfcfa51
3/ next add translation http://prntscr.com/ix0k0l It will work.
If you have checked all and followed the instruction, however, you still have the problem, provide us with your site admin access
Best Regards
May 28, 2018 at 8:15 am #59940
mrvintervindParticipantHello, it´s still the same problem. I´ve 2 licenses on your theme and it´s the same problem on both of them and both use WPML but not know if that causes the issue.
The problem is not the language itself then I switch. Just the permalinks that converts into ID instead of the nice url that work for the whole site but no with HTML blocks.
I´ll send you the login so you can check.
In HTML BLock section go to FLAGS [html_block id="1798"] and you´ll see when you try to change the url to for example to /kontakt/ save the page and then look back and it´s changed to ID.
May 28, 2018 at 10:58 am #59972
Elise NoromitMemberHello,
After checking your site we see the following: http://prntscr.com/jnjpl1
You create HTML block with HTML + CSS inside of Text element. It is not correct. You see what the code is now. It contains the mistakes.
You need to create a row with three columns and insert text block for text and product element to display products or you can try to apply information box
Here is the reason your link is displayed in this way http://prntscr.com/jnjrgr
Please create your HTML block properly.
Best Regards
May 28, 2018 at 11:02 am #59974
mrvintervindParticipantThe link you printscreen you sended have my customer made, but the block FLAGS have this code.
<div class=”topbar-lang”>
<div style=”float: left; height: 20px; margin-right: 0px; padding-top: 5px;”>Kontakt Köpvillkor</div>
<div style=”float: left; height: 20px; display: none;”>[wpml_language_selector_widget]</div>
</div>What is wrong with this, don´t quite understand what the problem are because I can modify or add code in a text element. How else do I add this modifications? Never problem else.
May 28, 2018 at 11:16 am #59979
Elise NoromitMemberHello,
Your code contains errors: http://prntscr.com/jnjpl1
Please insert correct links instead of http://prntscr.com/jnjrgr so that your lins could be displayed as they should.
Best Regards
May 28, 2018 at 11:19 am #59984
mrvintervindParticipantYes, that my customer added that code so lets leave that for now. I´ll correcy this BUT check our the html-block i mentioned FLAGS.
There is the ID problem.May 28, 2018 at 11:42 am #59990
Elise NoromitMemberHello,
Please have a look at the screen: http://prntscr.com/jnk1uh
Yes, you can insert HTML + CSS into the text block, provided this code does not contain errors. CSS cannot contain HTML tags inside. HTML cannot contain shortcodes inside.
it convert for example “/en/crossmedia” to a id url “/?page_id=228”
Reason: http://prntscr.com/jnjrgr
to the primary language and not the /en/ folder
The reason you do not have a language switcher on your site. Here is the home page in different languages:
http://bregmos.parkinglot.se/ = default
http://bregmos.parkinglot.se/en/ = English
http://bregmos.parkinglot.se/no/
http://bregmos.parkinglot.se/fi/So URL is created and displayed properly
but the block FLAGS have this code.
Are you trying to create the code for language switcher? You do not need to do that. Navigate to WPML > Languages > and find options to add the code to menu or widget.
Please find here more information and instruction how to configure WPML: https://wpml.org/documentation/
check our the html-block i mentioned FLAGS.
There is the ID problem.Reason: HTML can not contain shortcode inside http://prntscr.com/jnkao9 The code is not valid.
Best Regards
May 28, 2018 at 11:51 am #59995
mrvintervindParticipantHello, yes I had to disable the language selector because my customer not want to have the selector in the first release. So. it´s active but hidden as you see in the div and style “display:none”, but the problem is still there. I´ve done many web sites but not had this problem before. I have on this site and the other one I have this HTML block feature that are in your theme. I like it but it does not work as other edited blocks do.
I know css can not take html tags inside itself. It´s my customer that added that part, that I will clean of course. But he problem is that a div that contain a “style=”” can containe a link as I´ve done. Never had that problem before.
I also worked with WPML för +50 site with not this kind of problem so it´s somethings with your HTML Block editor that are wrong, must be.
CAn you change the ID link in the FLAGS block and save it?
May 28, 2018 at 12:55 pm #60013
Elise NoromitMemberHello,
1. Make your code valid.
2. Add the link in the format as follows: http://prntscr.com/jnla5b instead of http://prntscr.com/jnjrgr
Best Regards
May 28, 2018 at 1:18 pm #60015
mrvintervindParticipantThanks for fast reply and good service I must first say. BUT why can´t I as I always done use divs and li etc in a text block? It never been problem of any kind in a post or page. Is this a limitation in your HTML Block module? I must control the layout in this block and how do I do that if I can´t use divs etc?
May 28, 2018 at 4:29 pm #60061
Elise NoromitMemberHello,
HTML block supports HTML and CSS inserted properly and with valid code. Even if you insert in Text block. The only condition – code should be valid.
At the same time, if you want to see URL as per your settings in Permalinks, insert it in the way I provided above. HTML block is destined to create a template with WP Bakery Page builder which supports link format I mentioned above.Best Regards
May 28, 2018 at 6:20 pm #60085
mrvintervindParticipantBut how do you insert a div and control it by pixel value or construct freely?
You just put in a ordinary href link with no divs etc. Then it´s not lika a post or page that you are totally free to create what you want. Just so I understand the logic and the limitations at it seems to be in the HTML BLocks module. Not understand why there is like his but that´s maybe another question.Best regards Robert
May 28, 2018 at 7:21 pm #60105
Elise NoromitMemberHello,
Add a Raw HTML element http://prntscr.com/jnql1t and insert there HTML. If you enter the link in the HTML format I provided above, you will get URL as per your permalinks settings, if you insert the link as it is in your code you will get page id instead of page name URL.
Best Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register