View Issue Details

IDProjectCategoryView StatusLast Update
0001522Slicer4public2012-02-17 14:17
Reporterjcfr Assigned Tomhalle  
PriorityhighSeveritymajorReproducibilityN/A
Status closedResolutionfixed 
Product VersionSlicer 4.0.0 
Target VersionSlicer 4.1.0Fixed in VersionSlicer 4.1.0 
Summary0001522: Make sure GetData special page does NOT pre-append two extra empty lines
Description

There is an issue I would like to resolve:

I created two pages to illustrate the problem:
http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.0/Developers/Sandbox
http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.0/Developers/Sandbox2

I think the problem is that the URL :http://wiki.slicer.org/slicerWiki/index.php/Special:GetData/Documentation/4.0/Developers/Sandbox_data returns two extra empty lines at the top.

This is important, it will be a key element to simplify the Slicer4 documentation process.

TagsNo tags attached.

Relationships

related to 0001565 acknowledgedjcfr Email address in the documentation template 
related to 0001602 acknowledgedjcfr "tag" to identify CLI executables 

Activities

jcfr

jcfr

2012-01-25 12:48

administrator   ~0003539

The same extension installed on CTK wiki works as expected. See http://www.commontk.org/index.php/Sandbox

mediawiki version:
CTK: 1.16.5 - See http://www.commontk.org/index.php/Special:Version
Slicer: 1.15.1 - See http://wiki.slicer.org/slicerWiki/index.php/Special:Version

mhalle

mhalle

2012-01-26 08:53

developer   ~0003550

Jc.

Ron and Steve brought this issue back to my attention. Unless you know exactly what's causing this problem, I would prefer to go on the lead that the CTK wiki isn't broken. The version of MediaWiki seems different, and I'm not sure if the plugin has and difference in configuration as well.

If we can avoid groveling through MediaWIki source code and monkey-patching the problem, I'd be happier. If it's a config problem on our side, then let's by all means do the quick fix.

Let me know how you'd like to proceed.
--Mike

jcfr

jcfr

2012-01-26 09:43

administrator   ~0003552

Last edited: 2012-01-26 09:43

Hi Mike,

Thanks for looking into the issue.

The first step could be the update of the ExternalData extension installed on Slicer wiki.

CTK wiki: External Data (Version 1.3.3)
Slicer wiki: External Data (Version 1.3.2)

Version info can be retrieved on the following pages:
http://www.commontk.org/index.php/Special:Version
http://wiki.slicer.org/slicerWiki/index.php/Special:Version

Installation an extension is very easy. From the documentation of the extension:

//------------------
To install the extension, place the entire 'ExternalData' directory
within your MediaWiki 'extensions' directory, then add the following
line to your 'LocalSettings.php' file:

 require_once( "$IP/extensions/ExternalData/ExternalData.php" );

//------------------

The lastest version 1.3.5 requires a recent version, that's why I would suggest to check out version 1.3.4 that requires Mediawiki 1.11 or higher.

To do so:

cd /path/to/mediawiki/extensions
rm -r ExternalData
svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/ExternalData/ -r 105197

Let me know if you need further guidance or help.

mhalle

mhalle

2012-01-26 09:50

developer   ~0003553

Try now.

jcfr

jcfr

2012-01-26 11:25

administrator   ~0003559

It doesn't work :(

I locally installed a version of 1.15.1 with the same extension that are used on Slicer Wiki (same version of the extension also). See screenshot LocalInstall-1.15.1-works_ExternalData.png.

... and it works. See screenshot Local_Mediawiki-1.15.1_works_ExternalDataExample.

Few things to try:

  • Seems the extension ConfirmEdit is installed but doesn't work on SlicerWiki. I would suggest to try to comment the corresponding line in LocalSettings.php

  • Seems two extra lines have been introduced somewhere. Could you archive the mediawiki installation and send it to me by email ? It should be around 20MB. Make sure to exclude tmp files etc ..

  • Within extensions/ExternalData/ED_GetData.php, adding debug statement using either of error_log or fwrite could help. See http://php.net/manual/en/function.error-log.php

Thanks

2012-01-26 11:25

 

2012-01-26 11:26

 

jcfr

jcfr

2012-01-26 12:30

administrator   ~0003561

Just noticed that every wiki page served by slicer wiki contains two extra lines at the top. See screenshot AllPageSlicerWiki_ExtraLines.png

I am able to reproduce the issue by adding to empty line at the top of LocalSettings.php. See LocalSettings_ExtraLines

If localSettings.php is fine .. you should check the other php script for extra blank line at the top.

2012-01-26 12:30

 

2012-01-26 12:31

 

mhalle

mhalle

2012-01-26 18:46

developer   ~0003563

Weird. I think it's fixed. There weren't any extra lines on the top of LocalSettings.php, but I couldn't find any spurious extra lines anywhere else either. I essentially did your test and put extra lines at the top of LocalSettings, then removed them.

And then everything magically worked: the lines are gone, and your example appears to work.

At any rate, at least I managed to do a small amount of random cleaning up as well (disabled the recaptcha extension).

Please verify and close.

jcfr

jcfr

2012-02-02 03:20

administrator   ~0003598

Works great. See http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.0/ModulesMetadata

jcfr

jcfr

2012-02-07 17:13

administrator   ~0003611

Last edited: 2012-02-07 17:20

For some reason, it seems something has been changed .. using the following URL:

http://wiki.slicer.org/slicerWiki/index.php/Special:GetData/Documentation/4.0/Developers/Sandbox_data

return this result;

<source lang="php" line="true">
Name,Color,Shape
Apple,Red,Round
Banana,Yellow,Oblong
Orange,Orange,Round
Pear,Yellow,"Pear-shaped"

whereas the following is expected:

Name,Color,Shape
Apple,Red,Round
Banana,Yellow,Oblong
Orange,Orange,Round
Pear,Yellow,"Pear-shaped"

Looking at the source of any slicer wiki page, we can see that the line:

"<source lang="php" line="true">"

is at the top.

Would it be possible to make sure :
Both LocalSettings and the brettcrumb extension don't have the closing "?>" php tag at the end.

See here for details: https://www.mediawiki.org/wiki/Manual:LocalSettings.php

"Your version of LocalSettings.php may not end with a closing PHP tag of ?>. This is done on purpose, as it prevents people from accidentally adding new information after this tag. PHP will function just fine without a closing tag."

2012-02-13 06:46

 

Screenshot-1.png (118,459 bytes)
Screenshot-1.png (118,459 bytes)
jcfr

jcfr

2012-02-13 06:47

administrator   ~0003626

Just added a screenshot to illustrate the issue.

mhalle

mhalle

2012-02-13 08:03

developer   ~0003627

I've removed the closing tag at the end of LocalSettings.php.

As an aide, what a ridiculous convention, even if the mechanism and logic are understandable.

jcfr

jcfr

2012-02-13 08:40

administrator   ~0003628

Agreed ... adding the closing tag at the end shouldn't cause all this trouble.
Thanks for your help. It works great.

Issue History

Date Modified Username Field Change
2011-11-03 07:13 jcfr New Issue
2011-11-03 07:13 jcfr Status new => assigned
2011-11-03 07:13 jcfr Assigned To => jcfr
2012-01-25 12:00 jcfr Relationship added parent of 0001565
2012-01-25 12:23 jcfr Relationship added parent of 0001602
2012-01-25 12:48 jcfr Note Added: 0003539
2012-01-26 08:53 mhalle Note Added: 0003550
2012-01-26 09:43 jcfr Note Added: 0003552
2012-01-26 09:43 jcfr Note Edited: 0003552
2012-01-26 09:50 mhalle Note Added: 0003553
2012-01-26 11:25 jcfr Note Added: 0003559
2012-01-26 11:25 jcfr File Added: LocalInstall-1.15.1-works_ExternalData.png
2012-01-26 11:26 jcfr File Added: Local_Mediawiki-1.15.1_works_ExternalDataExample.png
2012-01-26 11:31 jcfr Assigned To jcfr => mhalle
2012-01-26 12:30 jcfr Note Added: 0003561
2012-01-26 12:30 jcfr File Added: LocalSettings_ExtraLines.png
2012-01-26 12:31 jcfr File Added: AllPageSlicerWiki_ExtraLines.png
2012-01-26 18:46 mhalle Note Added: 0003563
2012-01-26 18:48 mhalle Status assigned => resolved
2012-01-26 18:48 mhalle Resolution open => fixed
2012-02-02 03:20 jcfr Note Added: 0003598
2012-02-02 03:20 jcfr Status resolved => closed
2012-02-02 03:20 jcfr Fixed in Version => Slicer 4.0.1
2012-02-02 03:21 jcfr Relationship deleted parent of 0001565
2012-02-02 03:22 jcfr Relationship added related to 0001565
2012-02-02 03:22 jcfr Relationship deleted parent of 0001602
2012-02-02 03:22 jcfr Relationship added related to 0001602
2012-02-07 17:13 jcfr Note Added: 0003611
2012-02-07 17:13 jcfr Status closed => assigned
2012-02-07 17:20 jcfr Note Edited: 0003611
2012-02-13 06:46 jcfr File Added: Screenshot-1.png
2012-02-13 06:47 jcfr Note Added: 0003626
2012-02-13 08:03 mhalle Note Added: 0003627
2012-02-13 08:05 mhalle Status assigned => resolved
2012-02-13 08:40 jcfr Note Added: 0003628
2012-02-13 08:40 jcfr Status resolved => closed
2012-02-13 08:40 jcfr Fixed in Version Slicer 4.0.1 => Slicer 4.0 AHM Summer 2012
2012-02-17 14:09 finetjul Fixed in Version Slicer 4.x AHM Summer 2012 => Slicer 4.1.0
2012-02-17 14:17 finetjul Target Version => Slicer 4.1.0