Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When editing content, there's a odd space due to a missing short filter tip callback:
Comment | File | Size | Author |
---|---|---|---|
#3 | shortcode-filter_tips-2594175-03.patch | 654 bytes | nicrodgers |
#2 | shortcode_filter_tips-2594175-2.patch | 1.59 KB | FluxSauce |
Comments
Comment #2
FluxSauce CreditAttribution: FluxSauce at Four Kitchens commentedComment #3
nicrodgersHi FluxSauce, thanks for the patch.
I'm trying to recreate the issue you describe. In a clean Drupal install, I installed and enabled shortcode-7.x-2.x.
I then enabled the Shortcode filter on an input format, then went to the node add basic page, selected the input format and observed the results. I saw an empty blank line as per your screenshot.
I then applied your patch, which applied cleanly, and refreshed the node add page. I see 'Render Shortcodes' instead of the empty line.
However, even with the patch applied, when $long == TRUE, an empty line is still produced.
This is caused when there are no shortcodes enabled, or no shortcodes enabled for the selected input filter, as there is no check for whether $shortcodes is empty or not and returns a list regardless.
Thinking it through some more, I can see why the original code doesn't distinguish between $long == TRUE and $long == FALSE, as in both cases it's useful to display the shortcodes that are set up. Therefore, I'm attaching a new patch, which is more closely based on the original code but updated to check if one or more shortcode is actually enabled.
Comment #5
Denes.Szabo CreditAttribution: Denes.Szabo as a volunteer commentedComment #6
Denes.Szabo CreditAttribution: Denes.Szabo as a volunteer commented