Open CreationCassel opened 10 years ago
@CreationCassel Thanks for the report!
I was unable to reproduce this in a clean installation though. When I've seen this sort of thing in the past, it was almost always caused by a plugin/theme conflict related to shortcode parsing. When I visit your site I find several <br />
tags in the final shortcode output by s2Member. That suggests that you have a WP plugin/theme that is not respecting the HTML output from a shortcode.
It might sound odd but i cannot see the br tags. Could you copy a segment where it shows? I would love to delete them, but without seeing them... it is pretty hard.
Cassel
From: JasWSInc Sent: Tuesday, September 23, 2014 10:18 AM To: websharks/s2member Cc: CreationCassel Subject: Re: [s2member] php code causes white lines? (#343)
@CreationCassel Thanks for the report!
I was unable to reproduce this in a clean installation though. When I've seen this sort of thing in the past, it was almost always caused by a plugin/theme conflict related to shortcode parsing. When I visit your site I find several
tags in the final shortcode output by s2Member. That suggests that you have a WP plugin/theme that is not respecting the HTML output from a shortcode.
— Reply to this email directly or view it on GitHub.
I don't think it's something that you can just remove, these are generally caused (i.e. injected inadvertently) by a misbehaving plugin/theme that conflicts with WP shortcodes. I found the <br />
tags in the source code of your page.
I see. Thanks. I wonder if WP4.0 did that. I noticed it did mess up the behavior of some php code on other pages, maybe it affected that one too.
Thanks for identifying those, so i’ll see if i can even just replace the code for the paypal button by a fresh version. Hopefully it will work. If i find a more specific cause or solution, i’ll let you know in case it can happen to others.
Cassel
From: JasWSInc Sent: Friday, September 26, 2014 11:04 AM To: websharks/s2member Cc: CreationCassel Subject: Re: [s2member] php code causes white lines? (#343)
I don't think it's something that you can just remove, these are generally caused (i.e. injected inadvertently) by a misbehaving plugin/theme that conflicts with WP shortcodes. I found the
tags in the source code of your page.
— Reply to this email directly or view it on GitHub.
Hi,
I found a partial “solution” and it looks like it might be a WP thing that is affecting s2M button output. Here is the steps i took to test, based on someone’s wild suggestion:
1- I recreated the button and copied/pasted a fresh php version in WP (through the text mode). It still had that space.
2- I used the same button code, and remove all the line changes, not line breaks, but all the “formatting” that was made with the code when i copied it, so it looked something like this (this is only a part of it):
Interestingly, this would take care of the extra space (but much harder to read, for sure). 3- i used the same code, with line changes and nice looking format, and used it in a html leaf for Headway Theme, and the space does not appear. So i am suspecting that WP4.0 is adding those break tags to the php code generated by s2M. Carole From: JasWSInc Sent: Friday, September 26, 2014 11:04 AM To: websharks/s2member Cc: CreationCassel Subject: Re: [s2member] php code causes white lines? (#343) I don't think it's something that you can just remove, these are generally caused (i.e. injected inadvertently) by a misbehaving plugin/theme that conflicts with WP shortcodes. I found the@jaswsinc In my test installation I tried the HTML for the button as gotten from generator, pasted it in the Text editor of a page, saved and there are a lot of empty lines before the button.
In my test installation I tried the HTML for the button as gotten from generator, pasted it in the Text editor of a page, saved and there are a lot of empty lines before the button.
That's to be expected. Any raw HTML that you input into a default WordPress installation (no matter which tab you are working from in the editor) is subject to the content filters applied by WordPress. I suggest using the shortcodes provided by s2Member to avoid this problem. Or, if you must use raw HTML, please use it in conjunction with a plugin like raw HTML. https://wordpress.org/plugins/raw-html/
@CreationCassel If you are using an s2Member shortcode and still getting blank lines (i.e. <br />
tags), it would indicate a plugin/theme conflict in WordPress content filters. Testing in a clean WP install should help prove this. Or, disabling one theme/plugin at a time until the issue goes away would be a way to narrow things down.
I tested s2Member's shortcodes in WP v4.0 and the only issue that I'm finding is related to a bug with the wptexturize
filter, as detailed here. That's not related to the <br />
problem though. See also: https://github.com/websharks/s2member/issues/349
Oh, I see, the Text editor still converts newlines to line-breaks, I thought that it was a plain text editor only and missed that part. Sorry about changing the label then.
Yeah, I guess wrapping with a raw shortcode would take care of it. Thanks!
Shortcode is NOT a problem. However, (1) if s2Member generates a php code (not html), shouldn’t it be usable in WP? otherwise, what would be the point? (2) i need the php version to insert a particular hack, which cannot be placed inside a shortcode (3) the php code worked perfectly since i had that page created and the buttons added in August 2013
I just find it odd that it only appeared now that i have updated WP (unless it was the last s2M update??) and now, i would need a plugin to be able to use the code (that worked fine before) provided by your plugin.
Carole
From: JasWSInc Sent: Monday, September 29, 2014 8:32 PM To: websharks/s2member Cc: CreationCassel Subject: Re: [s2member] php code causes white lines? (#343)
In my test installation I tried the HTML for the button as gotten from generator, pasted it in the Text editor of a page, saved and there are a lot of empty lines before the button.
That's to be expected. Any raw HTML that you input into a default WordPress installation (no matter which tab you are working from in the editor) is subject to the content filters applied by WordPress. I suggest using the shortcodes provided by s2Member to avoid this problem. Or, if you must use raw HTML, please use it in conjunction with a plugin like raw HTML. https://wordpress.org/plugins/raw-html/
@CreationCassel If you are using an s2Member shortcode and still getting blank lines (i.e.
tags), it would indicate a plugin/theme conflict in WordPress content filters. Testing in a clean WP install should help prove this. Or, disabling one theme/plugin at a time until the issue goes away would be a way to narrow things down.
I tested s2Member's shortcodes in WP v4.0 and the only issue that I'm finding is related to a bug with the wptexturize filter, as detailed here. That's not related to the
problem though. See also: #349
— Reply to this email directly or view it on GitHub.
i need the php version to insert a particular hack, which cannot be placed inside a shortcode
It's fine, just try wrapping it inside the [raw] tag to avoid the
tags WP is adding. https://wordpress.org/plugins/raw-html/ :)
It might be important to notify the users though, or they will think s2M is faulty.
From: Cristián Lávaque Sent: Monday, September 29, 2014 8:53 PM To: websharks/s2member Cc: CreationCassel Subject: Re: [s2member] php code causes white lines? (#343)
i need the php version to insert a particular hack, which cannot be placed inside a shortcode
It's fine, just try wrapping it inside the [raw] tag to avoid the tags WP is adding. https://wordpress.org/plugins/raw-html/ :)
— Reply to this email directly or view it on GitHub.
Thanks. I agree it'd be good to add a note about it next to the field in the generator, just as the PHP execution plugin requirement is mentioned. @jaswsinc
Agreed, we can add a note here to warn site owners about using raw HTML code in WP. I think we had a warning there awhile back, but it was removed at some point; now only a note about the PHP code exists there.
It's never been possible to insert raw HTML into any version of WordPress without having unexpected behavior.
Maybe the footnote could read: "Using this will require a Raw HTML plugin and a PHP Execution plugin."
@clavaque I agree, that's perfect! Can you work on this?
I guess i must have been lucky because i always used it AS IS without any issue. shrug
Carole
From: JasWSInc Sent: Monday, September 29, 2014 9:04 PM To: websharks/s2member Cc: CreationCassel Subject: Re: [s2member] Warn Site Owners about Raw HTML (#343)
Agreed, we can add a note here to warn site owners about using raw HTML code in WP. I think we had a warning there awhile back, but it was removed at some point; now only a note about the PHP code exists there.
It's never been possible to insert raw HTML into any version of WordPress without having unexpected behavior.
— Reply to this email directly or view it on GitHub.
And may i suggest a link to that plugin?
From: Cristián Lávaque Sent: Monday, September 29, 2014 9:06 PM To: websharks/s2member Cc: CreationCassel Subject: Re: [s2member] Warn Site Owners about Raw HTML (#343)
Maybe the footnote could read: "Using this will require a Raw HTML plugin and a PHP Execution plugin."
— Reply to this email directly or view it on GitHub.
@jaswrks
PayPal Buttons causing space above button due to RAW HTML in Text Widget Areas.
WordPress Version: 4.8 Current WordPress Theme: Twenty Seventeen version 1.3 Active Plugins: s2Member Version 170722 + s2Member Pro v170722 PHP Version: 7.1.3-3+deb.sury.org~xenial+1 MySQL Version: 10.0.29-MariaDB-0ubuntu0.16.04.1
Current workaround is to install: https://wordpress.org/plugins/raw-html/ and disable automatic formatting.
Update - unchecking the "automatically add paragraphs" can fix the spacing issue.
I am not sure when it did happen, but i didn't edit a specific page in a long time. I am using the PHP code for a Paypal button. I need the php version instead of the shortcode because of a hack used in it.
This worked fine for many months but today, as i was looking at the page to do some edits, i noticed that the php code "displays" as extra white lines, and that means a LOT of lines.
Here is the page in question: http://scrapbookcampus.com/register-creative-scrap-course-2 Notice that each green button is preceded by a many white lines, but there is no way to remove them without removing the php code.
I do not know if it was some of the updates that caused that, or a WP upgrade, but i know it was not like that before. I just don't know how long ago it happened since that is not a page i look at or edit often at all.
Cassel