-
AuthorPosts
-
July 20, 2022 at 4:19 am #1358842
Hi there
I followed the documentation here: https://kriesi.at/documentation/enfold/intro-to-layout-builder/#alb-for-any-post-type regarding allowing ALB to be used by other post types – in this case by LearnDash.
It worked in the sense that it enabled ALB in the “courses” and “lessons” interfaces, so that’s great.
However, when adding anything other than a text box, the spacebar button doesn’t work.
For example, if I add a “Special Heading” within ALB, I can type in the text for the heading, but pressing the spacebar button (to put a space between words) doesn’t work – I can’t add spaces between words/letters.
I’ve tried in multiple different elements – Code Block, Tabs etc, and it’s the same result – the spacebar doesn’t work when trying to enter text in those elements.
The only time it works is in the “text block” element – then the spacebar button works no problem.
Any idea what the problem could be? It’s an extremely odd issue – particularly because it’s not across all elements.
Here’s the code I added to the functions.php file:
require_once( 'functions-enfold.php' ); function avf_alb_supported_post_types_mod( array $supported_post_types ) { $supported_post_types[] = 'sfwd-lessons'; $supported_post_types[] = 'sfwd-courses'; $supported_post_types[] = 'sfwd-topic'; return $supported_post_types; } add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1); function avf_metabox_layout_post_types_mod( array $supported_post_types ) { $supported_post_types[] = 'sfwd-lessons'; $supported_post_types[] = 'sfwd-courses'; $supported_post_types[] = 'sfwd-topic'; return $supported_post_types; } add_filter('avf_metabox_layout_post_types', 'avf_metabox_layout_post_types_mod', 10, 1);
Please note there is no child theme, so this was added directly to the main functions.php file.
Any help would be greatly appreciated!
July 20, 2022 at 9:03 am #1358863Hi adapt,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( to be sure that we have enough time to debug ). - Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create an admin user and post the login credentials in the “private data” field.Best regards,
NikkoJuly 20, 2022 at 11:37 pm #1358967Thanks for the response Nikko. I’ve included the temporary login below. It’s set to expire 1 week after access – hopefully that’s sufficient time.
Please be advised, the issue mentioned above (spacebar not working) doesn’t just occur on LearnDash course/lesson pages, but sitewide, so on any regular Post or Page as well.
As mentioned, it works fine for Text Blocks, but seems like that’s the only element that it works for.
I’m wondering if it has something to do with the WYSIWYG editor? As that editor is not available in any other element.
Also please note – although I created a child theme, the active theme is NOT the child theme, so the code modification had to be made on the parent theme functions.php
July 21, 2022 at 12:12 am #1358971Sorry, one further issue we’ve noticed.
After adding in ALB into the LearnDash courses/lessons, it’s messing up placement of the “ld-section-heading” text from LearnDash – please see attached screenshots.
I’m assuming I just need to modify the “ld-section-heading” class to work around ALB, but not sure how to do this.
July 21, 2022 at 9:38 am #1358979maybe offtopic – but on ajax search input field – i hampered the return key by this – so that you can not go to search results page by pressing return key.
function disable_enter_key(){ ?> <script type="text/javascript"> (function($) { $(document).on('keypress keydown keyup', '#searchform', function(e) { if(e.keyCode == 13) { e.preventDefault(); return false; } }); })(jQuery); </script> <?php } add_action('wp_footer', 'disable_enter_key');
keyCode for Space is 32 – I don’t know if it is possible that a keyCode == 32 is accidentally suppressed on your installation.
July 21, 2022 at 11:10 am #1358995Hi,
Thanks for the info @guenni007.
The issue does not occur on our installation, so this is more likely an issue with a plugin or a custom script. We also noticed that when typing anything in any textarea or input fields (in a code block for example), a period or a dot is automatically appended to the text, which seems to be an autocomplete response or behavior.
Have you tried disabling the plugins temporarily? Please make sure toggle or temporarily disable the Enfold > Performance > File Compression settings afterwards.
Best regards,
IsmaelJuly 22, 2022 at 3:24 am #1359120Thanks @Ismael.
I systematically went through and disabled each plugin one at a time and tested, and sure enough, after disabling this plugin, the spacebar started working in ALB elements again.
I have no idea how/why that could interfere with the spacebar function in some ALB elements, but perhaps somewhere in that plugin’s code was some code similar to what @Guenni007 mentioned.
Additionally regarding the second issue with “ld-section-heading” appearing in the wrong place, I noted that when I disabled “display: flex” in Chrome developer tools, the text went to where it should be.
As such, I added
.ld-section-heading { display: inline !important; }
into Quick CSS, and that seemed to solve the problem.
I’m not sure if this is the best solution, and whether it’ll break when viewed on certain screens/resolutions, but for now I’m claiming it as a “win”….lol.
July 22, 2022 at 11:59 am #1359164Hi,
Great, I’m glad that you got things working, and thanks for update. We’ll keep this thread open in case you should have any further problem on the topic.
Best regards,
RikardSeptember 28, 2022 at 8:00 pm #1366786Hello. I’m just sharing my similar experience for anyone else having an issue where the spacebar quits working in certain ALB content elements. I also traced the problem to the same plugin mentioned above. Once the plugin is disabled, the spacebar works again.
September 28, 2022 at 8:06 pm #1366790Hi,
Thanks for the feedback and glad that this helped you also, if you have any further tips or questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘ALB for any post type (LearnDash). Spacebar doesn't work’ is closed to new replies.