PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Entity 'reg' not defined - s2Member Site Secured Badge Error

s2Member Plugin. A Membership plugin for WordPress®.

Entity 'reg' not defined - s2Member Site Secured Badge Error

Postby cclambie » January 27th, 2012, 12:26 am

Hi s2Member Users,

I just discovered an validation problem with s2Member badge:

I am using this DTD - http://www.openmobilealliance.org/tech/ ... bile12.dtd - for my site, and it does not have the HTML Entity 'reg' defined.

ie. I am getting the error "error on line 150 at column 432: Entity 'reg' not defined"

And on line 150 is :
Code: Select all
<a href="http://www.s2member.com/" onclick="window.open('http://www.s2member.com/s-badges/s-details.php?v=1&amp;site_url=http%3A%2F%2Fm.truesecrets.com.au%2Fstrange-tours-melbourne', '_popup', 'width=752,height=702,left='+((screen.width/2)-(752/2))+',screenX='+((screen.width/2)-(752/2))+',top='+((screen.height/2)-(702/2))+',screenY='+((screen.height/2)-(702/2))+',location=0,menubar=0,toolbar=0,scrollbars=0,resizable=1'); return false;" title="s2Member&reg;"><img src="//www.s2member.com/s-badges/s-badge.php?v=1&amp;site_url=http%3A%2F%2Fm.truesecrets.com.au%2Fstrange-tours-melbourne" style="border:0;" alt="s2Member&reg;" title="s2Member&reg; ( Security for WordPress&reg; )" /></a>


So I have downloaded the .dtd and self hosted it, pointing the DOCTYPE to my dtd, with
<!ENTITY reg "&#174;">
<!ENTITY raquo "&#187;">
<!ENTITY reg "&reg;">
<!ENTITY raquo "&raquo;">

But that hasn't worked :(

Any ideas on how to fix this?
If I knew where in s2Member to find the output code for the button I would try replacing "&reg;" with "&#174:" I have read this works on more DTDs than the other.
User avatar
cclambie
Registered User
Registered User
 
Posts: 57
Joined: April 8, 2011

Re: Entity 'reg' not defined - s2Member Site Secured Badge E

Postby cclambie » January 27th, 2012, 9:48 pm

According to an Expert on EE this is not allowed to be used here in HTML....
http://www.experts-exchange.com/Web_Dev ... #a37510590

Thoughts?
User avatar
cclambie
Registered User
Registered User
 
Posts: 57
Joined: April 8, 2011

Re: Entity 'reg' not defined - s2Member Site Secured Badge E

Postby Jason Caldwell » January 30th, 2012, 4:03 pm

Thanks for reporting this important issue.

Please check this file in your s2Member distribution.
/s2member/includes/templates/badges/s-badge.php
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Entity 'reg' not defined - s2Member Site Secured Badge E

Postby cclambie » January 31st, 2012, 2:18 am

Thanks Jason, that fixed it.

Updated file code to comply with HTML entity limitations of that DTD for Mobile.
Code: Select all
<?php
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
   exit("Do not access this file directly.");
?>

<div class="ws-plugin--s2member-s-badge">
<a href="http://www.s2member.com/" onclick="window.open('http://www.s2member.com/s-badges/s-details.php?v=%%v%%&amp;site_url=%%site_url%%%%no_cache%%%%display_on_failure%%', '_popup', 'width=752,height=702,left='+((screen.width/2)-(752/2))+',screenX='+((screen.width/2)-(752/2))+',top='+((screen.height/2)-(702/2))+',screenY='+((screen.height/2)-(702/2))+',location=0,menubar=0,toolbar=0,scrollbars=0,resizable=1'); return false;" title="s2Member&#174;"><img src="//www.s2member.com/s-badges/s-badge.php?v=%%v%%&amp;site_url=%%site_url%%%%no_cache%%%%display_on_failure%%" style="border:0;" alt="s2Member&#174;" title="<?php echo esc_attr (_x ("s2Member&#174; ( Security for WordPress&#174; )", "s2member-front", "s2member")); ?>" /></a>
</div>
User avatar
cclambie
Registered User
Registered User
 
Posts: 57
Joined: April 8, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 1 guest