#29450 closed defect (bug) (duplicate)
Shortcode breaks the page it's placed on
Reported by: | uriy84 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.0 |
Component: | Formatting | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
Hi.
I've found out that the following shortcode breaks a page, it doesn't load or shows truncated:
[myshortcode arg1="Aenean consectetur ipsum ante, vel egestas enim tincidunt quis. Pellentesque vitae congue neque, vel mattis ante. In vitae tempus nunc. Etiam adipiscing enim sed condimentum ultrices. Aenean consectetur ipsum ante, vel egestas enim tincidunt qu. In vitae tempus nunc. In vitaentbnbsdgsdsdgsdhsdhdsdhdsh Aenean consectetur ipsum ante, vel egestas enim tincidunt quis. Pellentesque vitae congue neque, vel mattis ante. In vitae tempus nunc. Etiam adipiscing enim sed condimentum ultrices. Aenean consectetur ipsum ante, vel egestas enim tincidunt qu. In vitae tempus nunc. In vitaentbnbsdgsdsdgsdhsdhdsdhdsh" /]
I'm using XAMPP for Windows 1.8.1 ( php v5.4.7 ) and Twenty Fourteen theme.
It doesn't seem to work in older versions of XAMPP either.
If I truncate the shortcode, it starts working:
[myshortcode arg1="Aenean consectetur ipsum ante, vel egestas enim tincidunt quis. Pellentesque vitae congue neque, vel mattis ante. In vitae tempus nunc. Etiam adipiscing enim sed condimentum ultrices. Aenean consectetur ipsum ante, vel egestas enim tincidunt qu. In vitae tempus nunc. In vitaentbnbsdg" /]
I think the issue was introduced in [28773], I tried to rollback to the previous commit ( [28772] ) and it worked.
Attachments (1)
Change History (25)
#3
@
10 years ago
I had no problems with the shortcode you provided, when alone in a post, either before or after [28773]. Did you have other content in the post?
#4
@
10 years ago
- Keywords reporter-feedback removed
There are no errors in php error logs, but I can see lots of failed requests in Chrome Developer Tools / Network tab: "(failed) net::ERR_CONNECTION_RESET"
I don't have any other content in the post.
This only happens when I use XAMPP though. I've tried using Vagrant, it works fine.
#5
follow-up:
↓ 11
@
10 years ago
What's your ini_get( 'pcre.backtrack_limit' )
(also ini_get( 'pcre.recursion_limit' )
) on both of these setups? I imagine that might be where we see the difference. Works fine for me with a backtrack limit of 100000, though, which is an order of magnitude less than the PHP default for PHP >= 5.3.7.
#6
@
10 years ago
Same values on both setups:
pcre.backtrack_limit: 1000000
pcre.recursion_limit: 100000
#7
follow-up:
↓ 8
@
10 years ago
From https://wordpress.org/support/topic/shortcode-attsparameters-limit-40-rc1
Hi,
update:
Its not parameters limit. Its characters limit. It happens if characters are more than 196. Its strange.
I installed WordPress 4.0 RC1 in my development environment. To test my plugin http://wordpress.org/plugins/easy-facebook-likebox/.
I am generating shortcode in widget area and have 11 shortcode parameters. It was working just fine with previous versions. For some reason WP 4.0 RC1 beta is not supporting more than 9 parameters.
If there are more than 9 parameters then it returns this error "This web page is not available" when view the page.
Is there any limit? If yes then how can I overcome this issue.
Thanks
#8
in reply to:
↑ 7
@
10 years ago
I'm using WAMP for Windows 2.2 ( php 5.3.13 ) and Twenty Fourteen theme.
It doesn't seem to work in older versions of XAMPP either.
Replying to Ipstenu:
From https://wordpress.org/support/topic/shortcode-attsparameters-limit-40-rc1
Hi,
update:
Its not parameters limit. Its characters limit. It happens if characters are more than 196. Its strange.
I installed WordPress 4.0 RC1 in my development environment. To test my plugin http://wordpress.org/plugins/easy-facebook-likebox/.
I am generating shortcode in widget area and have 11 shortcode parameters. It was working just fine with previous versions. For some reason WP 4.0 RC1 beta is not supporting more than 9 parameters.
If there are more than 9 parameters then it returns this error "This web page is not available" when view the page.
Is there any limit? If yes then how can I overcome this issue.
Thanks
#9
@
10 years ago
Same problem with wampserver 2.2 and WordPress 4 running on Windows.
Problem with wptexturize in the content area.
Workaround if function is removed via filter for the_content:
remove_filter( 'the_content', 'wptexturize' );
#11
in reply to:
↑ 5
@
10 years ago
Replying to nacin:
What's your
ini_get( 'pcre.backtrack_limit' )
(alsoini_get( 'pcre.recursion_limit' )
) on both of these setups? I imagine that might be where we see the difference. Works fine for me with a backtrack limit of 100000, though, which is an order of magnitude less than the PHP default for PHP >= 5.3.7.
I'm guessing it's an aberration in PCRE versions. It's mitigated by setting the backtrack limit to a very low number such as 1000 to cause the command to bail, but the default value of 100k or 1 million is leading to a crash instead. Still looking at some of the details in #29557.
#12
follow-up:
↓ 14
@
10 years ago
Uriy, have you tried the patch from this other ticket?
https://core.trac.wordpress.org/attachment/ticket/29557/miqro-29557.4.patch
I'm curious if that solves the problem before looking further.
#14
in reply to:
↑ 12
;
follow-up:
↓ 15
@
10 years ago
I applied the patch, but it only partially solved the problem. Some posts that didn't work now work, but some with longer shortcodes such as the one below still prevent the page from loading:
[gallery columns="3" ids="55959,55960,55961,55962,55963,55964,55965,55966,55967,55968,55969,55970,55971,55972,55973,55974,55975,55976,55977,55978,55979,55980,55981,55982,55983,55984,55985,55986,55987,55988,55989,55990,55991,55992,55993,55994,55995,55996,55997,55998,55999,56000,56001,56002,56003,56004,56005,56006" size="thumbnail"]
I had no issue with this shortcode until updating to 4.0.
Replying to miqrogroove:
Uriy, have you tried the patch from this other ticket?
https://core.trac.wordpress.org/attachment/ticket/29557/miqro-29557.4.patch
I'm curious if that solves the problem before looking further.
#15
in reply to:
↑ 14
;
follow-up:
↓ 16
@
10 years ago
Replying to SlothLoveChunk:
I applied the patch, but it only partially solved the problem. Some posts that didn't work now work, but some with longer shortcodes such as the one below still prevent the page from loading
That is helpful feedback. Here is another stab at just simplifying the new code:
https://core.trac.wordpress.org/attachment/ticket/29557/miqro-29557.5.patch
More feedback on these changes will help us figure out where to go next.
#16
in reply to:
↑ 15
;
follow-up:
↓ 18
@
10 years ago
The latest .5 patch seems to have done the trick. The aforementioned [gallery] shortcode that wasn't working is now working as expected. The shortcodes that were fixed with .4 are also still working.
Replying to miqrogroove:
Replying to SlothLoveChunk:
I applied the patch, but it only partially solved the problem. Some posts that didn't work now work, but some with longer shortcodes such as the one below still prevent the page from loading
That is helpful feedback. Here is another stab at just simplifying the new code:
https://core.trac.wordpress.org/attachment/ticket/29557/miqro-29557.5.patch
More feedback on these changes will help us figure out where to go next.
This ticket was mentioned in IRC in #wordpress-dev by MarkJaquith. View the logs.
10 years ago
#18
in reply to:
↑ 16
;
follow-up:
↓ 19
@
10 years ago
- Resolution set to duplicate
- Status changed from new to closed
Duplicate of #29557.
Replying to SlothLoveChunk:
The latest .5 patch seems to have done the trick. The aforementioned [gallery] shortcode that wasn't working is now working as expected. The shortcodes that were fixed with .4 are also still working.
Great! We are happy to hear results from other testers. In the meantime, this will be marked as duplicating the patched ticket.
#19
in reply to:
↑ 18
;
follow-up:
↓ 20
@
10 years ago
Replying to miqrogroove:
Duplicate of #29557.
Replying to SlothLoveChunk:
The latest .5 patch seems to have done the trick. The aforementioned [gallery] shortcode that wasn't working is now working as expected. The shortcodes that were fixed with .4 are also still working.
Great! We are happy to hear results from other testers. In the meantime, this will be marked as duplicating the patched ticket.
Hi. It still doesn't work for me with the shortcode I posted above. I've tested miqro-29557.4 and miqro-29557.5 patches.
#20
in reply to:
↑ 19
@
10 years ago
Strange, uriy84, if I put the long block of text from your shortcode into a similar one that I have (see below) it works post .5 patch. To be sure I wasn't crazy I overwrote the patched files with the ones released with 4.0 and, as expected, it stopped working. Re-patched one more time and the pages render fine. I am running WAMP 2.2.
Example of my shortcode:
[grid_box desc="Aenean consectetur ipsum ante, vel egestas enim tincidunt quis. Pellentesque vitae congue neque, vel mattis ante. In vitae tempus nunc. Etiam adipiscing enim sed condimentum ultrices. Aenean consectetur ipsum ante, vel egestas enim tincidunt qu. In vitae tempus nunc. In vitaentbnbsdgsdsdgsdhsdhdsdhdsh Aenean consectetur ipsum ante, vel egestas enim tincidunt quis. Pellentesque vitae congue neque, vel mattis ante. In vitae tempus nunc. Etiam adipiscing enim sed condimentum ultrices. Aenean consectetur ipsum ante, vel egestas enim tincidunt qu. In vitae tempus nunc. In vitaentbnbsdgsdsdgsdhsdhdsdhdsh"]
Replying to uriy84:
Replying to miqrogroove:
Duplicate of #29557.
Replying to SlothLoveChunk:
The latest .5 patch seems to have done the trick. The aforementioned [gallery] shortcode that wasn't working is now working as expected. The shortcodes that were fixed with .4 are also still working.
Great! We are happy to hear results from other testers. In the meantime, this will be marked as duplicating the patched ticket.
Hi. It still doesn't work for me with the shortcode I posted above. I've tested miqro-29557.4 and miqro-29557.5 patches.
#21
@
10 years ago
uriy84, send me a message on gmail. Maybe we can figure out why your PHP is still crashing.
#23
follow-up:
↓ 24
@
10 years ago
uriy84, this file might help
https://core.trac.wordpress.org/export/HEAD/trunk/src/wp-includes/formatting.php
#24
in reply to:
↑ 23
@
10 years ago
Replying to miqrogroove:
uriy84, this file might help
https://core.trac.wordpress.org/export/HEAD/trunk/src/wp-includes/formatting.php
Great! It seems to work ok for me.
Anything in PHP error logs?