Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've exported a Mantis project from one server to another and despite the MySQL SQL file (from which it was populated) showing:

(15375,'\r\n1. Log out\r\n\r\n2. When logging in, start ...

The final end-user view loses the \r\n and shows it only on one line:

1. Log out 2. When logging in, start typing 

When viewing through phpMyAdmin, I can see the record properly:

1. Log out

2. When logging in, start typing

How can I correct this behavior when displaying this data?

share|improve this question

\r\n is not displayed in HTML as a new line so it must be replaced with <br /> (using the php function nl2br) or the text must be parsed into paragraphs (like wordpress does it).

I am not familiar with Mantis, but maybe there are some settings regarding the output of a text.

If you cannot find the place where to make the changes in Mantis code/settings then maybe a dirty hack would be to just replace it directly in the SQL file. But in this case, the <br /> tag would probably show up when you'll edit the text later.

share|improve this answer
i think there should be some server level setting or Mantis level setting that should be taking care of it... Introducing the <br> would be a very last choice for me. – siliconpi Jan 13 '11 at 0:22
up vote 0 down vote accepted

The problem was due to me incorrectly importing data from the old database.

atrol (developer) 2011-01-14 07:10

read file doc/INSTALL chapter UPGRADING for the recommended way how to upgrade. I am quite sure that your step 1. is the reason for your problem.

You cleared table mantis_plugin_table, so you disabled the MantisCoreFormatting plugin which is the one who is reponsible for formatting the HTML output of issues. (where also handling of newlines is implemented)

Futhermore you cleared mantis_config_table. This is not a problem for the moment, but will be a problem in future for you when upgrading. There is one setting to hold the database schema version which is used when upgrading.

2011-01-14 22:01

Thanks atrol! That solved the problem exactly. I also restored / set mantis_config_table to its 1.2.4 value

INSERT INTO mantis_config_table VALUES ('database_version',0,0,90,1,'183');

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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