• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item2839: Newline missing at end of page

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal No Action Required   n/a  

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


It is possible to save a topic without a newline at the end. This messes up version control. Cairo's code to append a newline on topic save if needed seems to be gone.

-- PTh

Can you describe (1) how you managed to save a topic without a terminating newline and (2) how it messes up version control? There are several unit tests covering this case, and they work fine. Also, I just tried

<a href="%SCRIPTURL{"save"}%/Sandbox/MessedUp?text=Splot;forcenewrevision=1">Hit me</a>

and it also works fine.


I cannot reproduce this either. I get a newline character after the last character of the last line.

Without feedback since september I think it is time to discard. Reopen if needed.


Please do not close bugs that are real bugs. There are many examples on twiki.org, also after the upgrade to TWiki 4.1.0, such as TWiki:Main/JoshuaTharpLeftBar.

Bugs happen, but it is frustrating to have Cairo carefully programmed to make sure that the last line has always a newline, and to have a bug report rejected that this is no longer the case.


-- PTh

Sorry but when we cannot reproduce it and the reporter does not come back in 3 months I think it is perfectly natural to close a bug and I will personally do it again. The discard action often triggers the reporter to react. When a bug item has been in Waiting for Feedback for a month without feedback and I cannot reproduce the bug myself and noone else could, the bug gets closed. All you needed to do was react.

For us to be able to fix this one you need to give us some more examples and possibly also some log entries.

This could be the works of a plugin that we do not have normally.

-- KennethLavrsen - 29 Jan 2007

Put it back into feedback mode, to allow it to go through the lifecycle again.


I do not have the time to debug this, sorry.

-- PTh

Peter, I'm not denying you have seen a problem, but no-one else can reproduce it, there is insufficient information in this report to initiate a debug, and you don't have time to reproduce it - yet. This is why I left the problem in "Waiting for Feedback" state - because that's what it is - it's waiting for feedback from you, whenever you are able to find time to provide that feedback. It is not Confirmed until it can be reliably reproduced - we have to establish this minimum standard, or the Bug DB rapidly fills up with reports that lack sufficient basic information for anyone to address them. I'm flipping this back to "Waiting for Feedback" and if at the end of thrity days, we are still unable to reproduce it, then we have to judge that it is not reproducable.


It can be reproduced on twiki.org, anyone can see that. Cairo had code to add a newline at the end of the topic if missing, this was part of the save routine. This code seems to be gone. Sorry, as stated, I do not have the time to debug this so I am setting this to waiting for feedback for Crawford who did the refactor.

-- PTh

See lib/Store.pm, sub saveNew of TWiki 04-Sep-2006:

    if( ! $attachment ) {
        # RCS requires a newline for the last line,
        # so add newline if needed
        $text =~ s/([^\n\r])$/$1\n/os;

A quick glance over TWiki 4.1 shows that the newline is only added in a repRev. This needs to be debugged carefully, it should work properly with/without metadata, with/without direct save etc.

-- TWiki:Main.PeterThoeny - 02 Feb 2007

This one concerns me in respect to 4.1.1 because it is very basic

-- TWiki:Main.KennethLavrsen - 02 Feb 2007

This is like chinese water torture. Drip... drip.... you won't tell me how to reproduce the problem, or even what the problem is, but you want me to fix it!

Unfortunately try as hard as I can, I cannot reproduce any issue with newlines at the end of topics. Of course it would help if I knew what to look for! What on earth is wrong with TWiki:Main/JoshuaTharpLeftBar? You still haven't told me.

Note that the comment accompanying the piece of code you quote above is incorrect. RCS does not require, and never has required, a newline at the end of a file. I did find some issues to do with newlines in RcsLite when refactoring, which I fixed, but that's all. If newlines mattered to RCS, all the unit tests would fail reliably, as most of them of them do not put a newline at the end of data, including those that test repRev. Further, normal users who use RCS day-to-day in their work would have started world-war 3 by now if that were the case.

In the interest of my own sanity, I even added another unit test that exercises repRev with all data having no newlines anywhere, and they work perfectly in both Lite and Wrap. BTW thanks for pointing out the extra newline in repRev; I have removed it, and all the unit tests still pass, all the tests in the TestCases web pass, and exercising repRev from the browser doesn't show up any problems that I can see.

Please clarify exactly what incorrect behaviour, from a user perspective, you are reporting here.


Not like this, not with this language, and please do not add new bugs on purpose. I am closing this item as unresolved, even though it means we are continuing to ship buggy TWiki software.

-- TWiki:Main.PeterThoeny - 03 Feb 2007

This could be related to architecture, perhaps a Solaris issue only? Probably a good idea to paste full CPAN versions in use, for future debugging.

Is it possible to run the unit tests in the environment that demonstrates the error (or similar environment .. anyone?)

-- TWiki:Main.SteffenPoulsen - 05 Feb 2007

Summary Newline missing at end of page
ReportedBy TWiki:Main.PeterThoeny
Codebase 4.0.2, 4.1.0, ~twiki4
SVN Range TWiki-4.1-beta1, Tue, 29 Aug 2006, build 11384
AppliesTo Engine

Priority Normal
CurrentState No Action Required


TargetRelease n/a

Edit | Attach | Watch | Print version | History: r17 < r16 < r15 < r14 < r13 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r17 - 2007-02-05 - SteffenPoulsen
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback