This topic has 14 replies, 2 voices, and was last updated 6 years, 6 months ago ago by Rose Tyler
This has been an issue before, but a certain product category will not display properly on our site. The page is here: https://highlandpharms.com/best-cbd-dabs-waxes/
There is some kind of conflict. It only affects this product category.
Hello,
Please update xstore to latest version – http://prntscr.com/jp2e4t https://www.8theme.com/documentation/xstore/theme-installation/theme-update/
Regards
The theme was updated through WP. Updated last night, that is when category stopped working.
Hello,
Please provide us with FTP access.
Regards
Can you provide an email address? I can add you to our Flywheel SFTP.
Please open theme-functions.php file (xstore/framework) > find unicode_chars
function > and change this https://prnt.sc/jp2qz3 to https://prnt.sc/jp2r8i
Regards
I am not sure what you are referring to? I am not a developer.
You need to connect site via FTP, open theme-functions.php file and change
function unicode_chars($source, $iconv_to = 'UTF-8') {
$decodedStr = '';
$pos = 0;
$len = strlen ($source);
while ($pos < $len) {
$charAt = substr ($source, $pos, 1);
if ($charAt == '%') {
$pos++;
$charAt = substr ($source, $pos, 1);
if ($charAt == 'u') {
// we got a unicode character
$pos++;
$unicodeHexVal = substr ($source, $pos, 4);
$unicode = hexdec ($unicodeHexVal);
$decodedStr .= code2utf($unicode);
$pos += 4;
}
else {
// we have an escaped ascii character
$hexVal = substr ($source, $pos, 2);
$decodedStr .= chr (hexdec ($hexVal));
$pos += 2;
}
}
else {
$decodedStr .= $charAt;
$pos++;
}
}
if ($iconv_to != "UTF-8") {
$decodedStr = iconv("UTF-8", $iconv_to, $decodedStr);
}
return $decodedStr;
}
to
function unicode_chars($source, $iconv_to = 'UTF-8') {
$decodedStr = '';
$pos = 0;
$len = strlen ($source);
while ($pos < $len) {
$charAt = substr ($source, $pos, 1);
// if ($charAt == '%') {
// $pos++;
// $charAt = substr ($source, $pos, 1);
// if ($charAt == 'u') {
// // we got a unicode character
// $pos++;
// $unicodeHexVal = substr ($source, $pos, 4);
// $unicode = hexdec ($unicodeHexVal);
// $decodedStr .= code2utf($unicode);
// $pos += 4;
// }
// else {
// // we have an escaped ascii character
// $hexVal = substr ($source, $pos, 2);
// $decodedStr .= chr (hexdec ($hexVal));
// $pos += 2;
// }
// }
// else {
$decodedStr .= $charAt;
$pos++;
// }
}
if ($iconv_to != "UTF-8") {
$decodedStr = iconv("UTF-8", $iconv_to, $decodedStr);
}
return $decodedStr;
}
Regards
Ok can this be done in the child theme? Or will a theme update remove this?
I made this change in the theme-functions.php file in the XStore folder and the site stopped working. I had to reload the entire XStore theme folder.
Dear @kevinkjr,
You need to change the code in the file of the parent theme. We will add this fix in next theme update.
Please try one more time https://prnt.sc/jpdrql , this code should work fine:
function unicode_chars($source, $iconv_to = 'UTF-8') {
$decodedStr = '';
$pos = 0;
$len = strlen ($source);
while ($pos < $len) {
$charAt = substr ($source, $pos, 1);
// if ($charAt == '%') {
// $pos++;
// $charAt = substr ($source, $pos, 1);
// if ($charAt == 'u') {
// // we got a unicode character
// $pos++;
// $unicodeHexVal = substr ($source, $pos, 4);
// $unicode = hexdec ($unicodeHexVal);
// $decodedStr .= code2utf($unicode);
// $pos += 4;
// }
// else {
// // we have an escaped ascii character
// $hexVal = substr ($source, $pos, 2);
// $decodedStr .= chr (hexdec ($hexVal));
// $pos += 2;
// }
// }
// else {
$decodedStr .= $charAt;
$pos++;
// }
}
if ($iconv_to != "UTF-8") {
$decodedStr = iconv("UTF-8", $iconv_to, $decodedStr);
}
return $decodedStr;
}
Regards
Finally was able to get a developer to apply the fix. That worked. Thank you.
You’re welcome!
Feel free to ask if you have any other questions.
Regards
You must be logged in to reply to this topic.Log in/Sign up