0

I'm migrating an EE (2.10.1) installation from one server to another. The CP seems ok, but all of the templates show linebreaks as \n, effectively breaking the site. The SQL import / export appeared to work fine. I guess this is some kind of character set issue, but I'm not sure how to resolve it. I can manually copy template contents from the old site and paste it into the new (does seem to work), but will there be other symptoms caused by the issue that I haven't seen?

What I see in e.g. the offline template:

\n\n\n\n\n\n\n\n\n\n\n
\n\n
System Offline

\n\n
This site is currently offline

\n\n
\n\n\n\n

Migrating from:

Database server

Server: Localhost via UNIX socket
Server type: MySQL
Server version: 5.5.52-cll-lve - MySQL Community Server (GPL) by Atomicorp
Protocol version: 10
User: loft_user@localhost
Server charset: UTF-8 Unicode (utf8)

Web server

 nginx/1.9.2
Database client version: libmysql - mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $
PHP extension: mysqliDocumentation curlDocumentation mbstringDocumentation
PHP version: 5.6.14

phpMyAdmin

Version information: 4.6.5.1

Migrating to:

Database server

Server: Localhost via UNIX socket
Server type: MySQL
Server version: 5.5.53 - MySQL Community Server (GPL)
Protocol version: 10
User: [email protected]
Server charset: UTF-8 Unicode (utf8)

Web server

Apache/2.4.23 (Unix)
Database client version: libmysql - mysqlnd 5.0.8-dev - 20102224 - $Id: 731e5b87ba42146a687c29995d2dfd8b4e40b325 $
PHP extension: mysqli Documentation

phpMyAdmin

Version information: 4.0.10.18
5
  • I had this happen not long ago, I dropped the tables and reimported and everything looked fine. It was really odd and I didn't change anything on my reimport. Commented Dec 22, 2016 at 19:06
  • I've tried that a few times with no luck Commented Dec 22, 2016 at 20:13
  • Hmm, another thing I just thought about. My original export like yours was from phpMyAdmin, but I exported the second time as a SQL Dump (not from phpMyAdmin). I dropped the old tables, then reimported back into phpMyAdmin with the dump, and that's when it sorted itself out. Commented Dec 22, 2016 at 21:06
  • Thanks for the thoughts but I've just figured it out - simple fix in the end. I did a find and replace in the SQL file, replacing \\n with \n Commented Dec 22, 2016 at 21:11
  • Glad you fixed it! I've had odd troubles recently with phpMyAdmin and character encoding. Commented Dec 22, 2016 at 21:18

1 Answer 1

0

Simple fix in the end. I performed a find and replace in the SQL file - replacing "\n" with "\n". (No quotes)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.