hmarcbower
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] accented characters not displaying in descriptionAlright, so, playing around some more I found the following post:
He was getting the same thing with the new doctype and html/body codes. He also parsed his data going into the loadHTML php command. I put the woocommerce description.php file back the way it was, and modified
woo-photo-tags/woocommerce-photo-tags.phpfrom the plugin Woocommerce Photo Tags (not by the woocommerce team).
For anyone else who stumbles across this, I changed the following:
line 635:
from:
$doc->loadHTML($content);
to:
$doc->loadHTML(utf8_decode($content), LIBXML_HTML_NODEFDTD | LIBXML_NOBLANKS );It still leaves the html and body tags, but if I set the libxml value to remove those the formatting goes mad.
Thanks for the assistance. It’s clearly not a woocommerce issue at this point – I thought I’d share the solution here as well since it’s only going to happen to people who also use woocommerce even if it’s not a problem with the core plugin.
Forum: Plugins
In reply to: [WooCommerce] accented characters not displaying in descriptionHi @3sonsdevelopment , thanks for your reply.
I did a preview in 2019 and it looks the same as in the 2013 theme currently in use. I checked the code, and the woocommerce Description block is just pulling the_content() to get the long description from the post… so there’s no extra filtering being done. It’s weird that the exact same character appears fine elsewhere on the page (and by exact same, I mean that I have modified this at the database level to ensure that it’s not the editor or any editor plugin being an issue). I’m running version 3.9.1 of woocommerce (latest as of this writing).
Other tests I’ve run:
Use Chrome inspect function to actually modify the content on the page – added in the accented e (ALT+0233) and it displays correctly when modified at the browser side.I tried modifying the file woocommerce/templates/single-product/tabs/description.php and changing this:
<?php the_content(); ?>to this:
<?php echo(get_the_content()); ?>and it displayed correctly. Interestingly, with just the_content() pulling the info, there is also another DOCTYPE tag and <html> tag before the data. Here’s the page source for just calling the_content:
<div class="woocommerce-Tabs-panel woocommerce-Tabs-panel--description panel entry-content wc-tab" id="tab-description" role="tabpanel" aria-labelledby="tab-title-description"> <h2>Description</h2> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html><body><h3>Effréné ~ Spiritual Cologne</h3> <p>Effréné ~ Spiritual Cologne was made by request of theand here it is with my test modification:
<div class="woocommerce-Tabs-panel woocommerce-Tabs-panel--description panel entry-content wc-tab" id="tab-description" role="tabpanel" aria-labelledby="tab-title-description"> <h2>Description</h2> <h3>Effréné ~ Spiritual Cologne</h3> <p>Effréné ~ Spiritual Cologne was made by requestThat makes me think that some plugin has added a filter, but I don’t know which one it would be. I tried disabling several of the logical culprits, but it didn’t make a difference. If anyone else is having this issue, I’d love to compare plugins with you. It looks like it’s not specifically woocommerce, though.
5.04 – so that’s probably it.
CURL support is enabled in my php.ini file and displays the following with phpinfo():
CURL Information libcurl/7.11.2 OpenSSL/0.9.7c zlib/1.1.4Forum: Fixing WordPress
In reply to: Edit buttons in ‘Publish’ bar not workingAny reason for this? Similar behaviour just started for me – I can’t Publish or Update anything. If I disable TEC then it works perfectly – except for the Events Calendar, of course, which is sort of important. 🙂
Forum: Plugins
In reply to: [Plugin: The Events Calendar] clicking on calendar does not show me eventsExcellent, thanks for the correct fix. 🙂
Forum: Plugins
In reply to: [Plugin: The Events Calendar] Wrong dates in Grid!Check this thread for an explanation and possible resolution:
Forum: Plugins
In reply to: [Plugin: The Events Calendar] clicking on calendar does not show me eventsI’ve found where the problem is occurring:
the-events-calendar.php lines 1184-1189:
if ( isset ( $wp_query->query_vars['eventDate'] ) ) { $this->date = $wp_query->query_vars['eventDate'] . "-01"; } else { $date = date_i18n( The_Events_Calendar::DBDATEFORMAT ); $this->date = str_replace( substr( $date, 8 ), '01', $date ); }When there is no event selected (which would be normal going to the calendar view, called “month”), that last line takes over to construct the date passed to the grid creator.
substr($date,8)pulls out the ‘day’ digits of the month, since the date looks like this: YYYY-MM-DD and the 8th character is the first D, so the substr returns the DD part (which, today, is 03… see where the problem is yet?). The whole date is 2010-03-03.the str_replace tells it to check the $date (which is 2010-03-03) for the string figured out above (supposed to be the day pair) which turns out to be 03, and replace it with 01. So the date that is being calculated is now 2010-01-01 as both instances of the 03 were replaced with the 01. This must have also happened on February 2nd… unless there has been an update which modified this since then.
What I did to fix it, and I’m not sure why you’d always want the month view to default to highlighting the first day of the month, was to comment out this line:
//$this->date = str_replace( substr( $date, 8 ), '01', $date );
(the // comments out the line)and change it to this:
$this->date = $date;This seems to work, and it also serves to highlight what day is “today” on the month view.
I don’t think it breaks anything, but perhaps the people who wrote this could make sure I haven’t crippled anything. 🙂
On the up-side, of course… it should work perfectly well tomorrow (2010-03-04) and not break again until April 4th (2010-04-04).
Hope that helps someone.
Forum: Plugins
In reply to: [Plugin: The Events Calendar] clicking on calendar does not show me eventsditto on this problem. Weird that it can pass the current month into the page to select the right item in the dropdown, but doesn’t carry through to actually showing the right month in the calendar. I just installed this today, so I’m glad to see this isn’t how it has always worked and is just a new bug. 🙂