Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2018-07-10 18:16:56

jrmartin
Member
From: California | Italy
Registered: 2013-03-07
Posts: 116
Website

Re: Odd Characters, Blank Templates

So the hosting provider reports that a database upgrade happened at the time we noticed the odd characters.

I’ve gone through the pages with those characters (which were indeed pasted quotes and things) and replaced them. Now they’re good.

But there are still issues. For example, if I write “the emperors’ hats,” the trailing apostrophe causes that paragraph not to display on the html page.

And…my page templates included ©, which caused them not to display in the form. Scary. I went into the database and copied default and archive forms and changed the character to & copy; and pasted them into the form and all was well.

So I’m still worried about upgrading, given these problems.

Last edited by jrmartin (2018-07-10 18:19:04)

Offline

#14 2018-07-10 18:24:20

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: Odd Characters, Blank Templates

There are plugins which help with the upgrade of the db character set.

Try: rvm_latin1_to_utf8 and rvm_utf8_to_utf8mb4 after that, both are downloadable from the same page. Remember to backup your db before you install the plugins.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#15 2018-07-22 07:28:21

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: Odd Characters, Blank Templates

I read you did a database upgrade on this thread but saw no difference in the files. You can check if that is really the case by exporting your updated database and then comparing the old and new using a diff tool.

One further idea – do you have the line:

$txpcfg['dbcharset'] = 'utf8';

as shown here in your config.php file?

If you want some off-forum assistance, send me an email…


TXP Builders – finely-crafted code, design and txp

Offline

#16 2018-07-22 20:33:57

giz
Member
From: New Zealand
Registered: 2004-07-26
Posts: 259
Website

Re: Odd Characters, Blank Templates

I had a similar problem on a large site a couple of weeks ago (the host upgraded to a new cloud platform / mySQL version change – MariaDB v10 or 11).

After hours of futzing I resorted to brute force – full SQL dump onto my Mac, and then search and replace the offending characters with their ‘dumb’ equivalents eg \" instead of the intended . Note: the offending characters display perfectly in the mysql source.

After importing the changes back to the live site, the forms showed up correctly again, allowing us to manually correct the characters.

Last edited by giz (2018-07-22 20:36:32)

Offline

#17 2018-08-02 16:54:43

jrmartin
Member
From: California | Italy
Registered: 2013-03-07
Posts: 116
Website

Re: Odd Characters, Blank Templates

jakob wrote #313108:

I read you did a database upgrade on this thread but saw no difference in the files. You can check if that is really the case by exporting your updated database and then comparing the old and new using a diff tool.

One further idea – do you have the line:

$txpcfg['dbcharset'] = 'utf8';...

as shown here in your config.php file?

If you want some off-forum assistance, send me an email…

Thanks for your offer. I think I have it figured out. The database did indeed work, but about 30 articles had blank bodies. But this time I just copied the text out of the database and pasted it into the form and it all worked without changing the offending characters, which were evidently fixed in the database upgrade.

So now I think I’m ready to upgrade to 4.7.1 from 4.6.2 even though diagnostics is still reporting that 4.7.0 is available. I can upgrade directly to 4.71, can’t I?

Offline

#18 2018-08-02 22:56:18

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,058
Website

Re: Odd Characters, Blank Templates

jrmartin wrote #313227:

I can upgrade directly to 4.71, can’t I?

Sure you can (assuming you are satisfied with the current state / integrity of your site, after fixing all oddities). As always, having a DB back-up is recommended.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#19 2018-08-02 23:02:29

jrmartin
Member
From: California | Italy
Registered: 2013-03-07
Posts: 116
Website

Re: Odd Characters, Blank Templates

All the articles look good, only the languages page looks screwed up, like this:

?????? ???? Install 23 Mar 2018 06:50:39 AM - -
????????? Install 09 Oct 2017 09:04:03 AM - -
Bosanski Install 09 Oct 2017 09:04:03 AM - -
Catal Install 09 Oct 2017 09:04:03 AM

Offline

#20 2018-08-03 05:28:43

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: Odd Characters, Blank Templates

Can you post your diagnostics?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#21 2018-08-03 07:37:12

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,058
Website

Re: Odd Characters, Blank Templates

jrmartin wrote #313232:

All the articles look good, only the languages page looks screwed up, like this:

?????? ???? Install 23 Mar 2018 06:50:39 AM – -
????????? Install 09 Oct 2017 09:04:03 AM – -
Bosanski Install 09 Oct 2017 09:04:03 AM – -
Catal Install 09 Oct 2017 09:04:03 AM

That is strange. Can you have a look at the database, in the txp-lang table, search for entries in the name column for e.g. el-gr -> Ελληνικά (Greek), or fa-ir -> فارسی (farsi), or bg-bg -> български (Bulgarian), which is one of the languages you list with ?? marks.

On the other hand, I’m not sure it is a big issue prior to updating, as in TXP 4.7 the languages part has changed a lot, and the new files should be read, and the DB updated to match (I think …).


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#22 2018-08-03 14:00:11

jrmartin
Member
From: California | Italy
Registered: 2013-03-07
Posts: 116
Website

Re: Odd Characters, Blank Templates

colak wrote #313233:

Can you post your diagnostics?

Textpattern version: 4.6.2 (8412e32468526e075446b881d13bd9ce)
Last update: 2016-11-08 08:57:07/2016-11-05 06:13:11
Document root: /home/wanderi2/marthasitaly.com
$path_to_site: /home/wanderi2/marthasitaly.com
Textpattern path: /home/wanderi2/marthasitaly.com/textpattern
Article URL pattern: section_id_title
Temporary directory path: /home/wanderi2/marthasitaly.com/textpattern/tmp
Site URL: www.marthasitaly.com
PHP version: 7.0.31
GD Graphics Library: bundled (2.1.0 compatible); supported formats: GIF, JPG, PNG.
Server TZ: America/New_York
Server local time: 2018-08-03 09:56:54
Daylight Saving Time enabled?: 1
Automatically adjust Daylight Saving Time setting?: 1
Time zone (GMT offset in seconds): America/Los_Angeles (-28800)
MySQL: 10.1.31-MariaDB-cll-lve
Database server time: 2018-08-03 09:56:54
Database server time offset: 0 s
Database server timezone: SYSTEM
Database session timezone: SYSTEM
Locale: en_US.UTF-8
Server: LiteSpeed
PHP server API: litespeed
RFC 2616 headers:
Server OS: Linux 2.6.32-896.16.1.lve1.4.54.el6.x86_64
Active plugins: smd_lately-0.31, upm_textile_toggle-0.5, arc_meta-1.4.2, smd_article_stats-0.40
Admin-side theme: classic 4.6.2

Pre-flight check:
————————————
New Textpattern version 4.7.0 available for download.
Clean URLs are only supported on Apache, use at your own risk.
————————————

.htaccess file contents: ————————————
  1. BEGIN Textpattern
    #DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes
#ErrorDocument 403 default

<IfModule mod_rewrite.c> RewriteEngine On #RewriteBase /relative/web/path/

RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$ RewriteRule ^(.+) – [PT,L] RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$ RewriteRule ^(.*) index.php RewriteCond %{HTTP:Authorization} !^$ RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$ RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}] </IfModule>

#php_value register_globals 0

<IfModule mod_mime.c> AddType image/svg+xml svg svgz AddEncoding gzip svgz </IfModule>
  1. END Textpattern

————————————

Charset (default/config): latin1/utf8
character_set_client: latin1
character_set_connection: latin1
character_set_database: latin1
character_set_filesystem: binary
character_set_results: latin1
character_set_server: latin1
character_set_system: utf8
character_sets_dir: /usr/share/mysql/charsets/
17 Tables: textpattern is utf8, txp_category is utf8, txp_css is utf8, txp_discuss is utf8, txp_discuss_nonce is utf8, txp_file is utf8, txp_form is utf8, txp_image is utf8, txp_lang is utf8, txp_link is utf8, txp_log is utf8, txp_page is utf8, txp_plugin is utf8, txp_prefs is utf8, txp_section is utf8, txp_token is utf8, txp_users is utf8

10 Custom fields: custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10 (10)

PHP extensions: Core/7.0.31, date/7.0.31, libxml/7.0.31, openssl/7.0.31, pcre/7.0.31, sqlite3/7.0.31, zlib/7.0.31, bz2/7.0.31, calendar/7.0.31, ctype/7.0.31, curl/7.0.31, hash/1.0, filter/7.0.31, ftp/7.0.31, gettext/7.0.31, gmp/7.0.31, SPL/7.0.31, iconv/7.0.31, pcntl/7.0.31, readline/7.0.31, Reflection/7.0.31, session/7.0.31, standard/7.0.31, shmop/7.0.31, SimpleXML/7.0.31, mbstring/7.0.31, tokenizer/7.0.31, xml/7.0.31, litespeed, bcmath/7.0.31, dom/20031129, fileinfo/1.0.5, gd/7.0.31, imap/7.0.31, intl/1.1.0, json/1.4.0, exif/7.0.31, mcrypt/7.0.31, mysqli/7.0.31, PDO/7.0.31, pdo_mysql/7.0.31, pdo_pgsql/7.0.31, pdo_sqlite/7.0.31, pgsql/7.0.31, Phar/2.0.2, posix/7.0.31, soap/7.0.31, sockets/7.0.31, tidy/7.0.31, xmlreader/7.0.31, xmlrpc/7.0.31, xmlwriter/7.0.31, xsl/7.0.31, zip/1.13.5, Zend OPcache/7.0.31

Apache modules: mod_rewrite, mod_mime, mod_headers, mod_expires, mod_auth_basic

pretext_data: array ( ‘status’ => ‘200’, ‘id’ => ‘’, ‘s’ => ‘’, ‘c’ => ‘’, ‘context’ => ‘’, ‘q’ => ‘’, ‘m’ => ‘’, ‘pg’ => ‘’, ‘p’ => ‘’, ‘month’ => ‘’, ‘author’ => ‘’, ‘request_uri’ => ‘/3a48fe000e68415f5d5db57c403e69e7/?txpcleantest=1’, ‘qs’ => ‘txpcleantest=1’, ‘subpath’ => ‘\\/’, ‘req’ => ‘/3a48fe000e68415f5d5db57c403e69e7/?txpcleantest=1’,
)

Offline

#23 2018-08-03 14:40:35

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: Odd Characters, Blank Templates

I guess that ruud’s latin1 to utf8 plugin did not work. Back up your db first.

Then you can use some mysql in phpMyadmin or similar.

Before you do that, check the charset in your /textpattern/config.pho file. Is it $txpcfg['dbcharset'] = 'utf8'; or latin1?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#24 2018-08-03 14:53:08

jrmartin
Member
From: California | Italy
Registered: 2013-03-07
Posts: 116
Website

Re: Odd Characters, Blank Templates

$txpcfg[‘dbcharset’] = ‘utf8’;

Offline

Board footer

Powered by FluxBB