Project

General

Profile

Can't create links to other wiki pages

Added by Matthew Taylor over 15 years ago

Hi All,

I am having issues with creating links from one wiki page to another. Whatever I put within square brackets is not included on the output. See the attachment for an example. On the left is the source for a page, on the right is the rendered output. This only applies to wiki pages; urls to external sites work fine.

I'm using an redmine 0.7, Ruby 1.8.5 and mod_passenger on Dreamhost, installed with the instructions at http://wiki.dreamhost.com/Redmine. I'm a complete novice with Ruby.

Can anyone offer a solution? Thanks

--
jmtwo_tools@fay:~/redmine.jmtwo.com$ RAILS_ENV=PRODUCTION
jmtwo_tools@fay:~/redmine.jmtwo.com$ script/about
About your application's environment
Ruby version 1.8.5 (x86_64-linux)
RubyGems version 1.3.0
Rails version 2.0.2
Active Record version 2.0.2
Action Pack version 2.0.2
Active Resource version 2.0.2
Action Mailer version 2.0.2
Active Support version 2.0.2
Application root /home/jmtwo_tools/redmine.jmtwo.com
Environment development
Database adapter mysql


Replies (5)

RE: Can't create links to other wiki pages - Added by Thomas Lecavelier over 15 years ago

Hi Matthew,

Weird error. Could you confirm that you haven't any script automatically rewriting links (some greasemonkey script, or whatever) running, and pasting:

  • record content from your wiki entry
  • your log about recording the page and loading it

Maybe something to do if you can: try a ruby version 1.6(1.8.5 is old, 1.8.7 is too new for rails 2.0.2).

RE: Can't create links to other wiki pages - Added by norguir bellagio over 15 years ago

Thomas,

I have the same problem.
However, I have found that the link is recognized if there is a non whitespace char right before it as per the attached screenshot.
Also, attached the production.log relative to the submitted page.

Same config and hosting (Dreamhost) than Matthew. I ma not sure I can change the ruby version with Dreamhost.

Hope that helps.

Norguir.

RE: Can't create links to other wiki pages - Added by Matthew Taylor over 15 years ago

The entry for the wiki article in question

INSERT INTO `wiki_contents` (`id`, `page_id`, `author_id`, `text`, `comments`, `updated_on`, `version`) VALUES
(3, 3, 3, 'h1. Start\r\n\r\nTOC:\r\n[[Sub1]]\r\n[[Sub2]]\r\nhttp://www.example.com\r\n"Foo":http://foo.bar\r\n[[Wiki page]]\r\n\r\n-\r\n[[Guide]]\r\n-\r\n\r\nmore...', '', '2008-11-25 12:27:09', 11);

Log entries
Processing WikiController#edit (for 93.96.146.187 at 2008-11-25 12:35:09) [POST]
  Session ID: 9a193ad79f54b6db9e23511404213c72
  Parameters: {"commit"=>"Save", "action"=>"edit", "id"=>"jmtwo-svntest", "controller"=>"wiki", "content"=>{"comments"=>"", "text"=>"h1. Start\r\n\r\nTOC:\r\n[[Sub1]]\r\n[[Sub2]]\r\nhttp://www.example.com\r\n\"Foo\":http://foo.bar\r\n[[Wiki page]]\r\n\r\n-\r\n[[Guide]]\r\n-\r\n\r\nmore...", "version"=>"12"}, "page"=>"Start"}
Redirected to http://redmine.jmtwo.com/wiki/jmtwo-svntest/Start
Completed in 1.00951 (0 reqs/sec) | DB: 0.00000 (0%) | 302 Found [http://redmine.jmtwo.com/wiki/jmtwo-svntest/Start/edit]

Processing WikiController#index (for 93.96.146.187 at 2008-11-25 12:35:10) [GET]
  Session ID: 9a193ad79f54b6db9e23511404213c72
  Parameters: {"action"=>"index", "id"=>"jmtwo-svntest", "controller"=>"wiki", "page"=>"Start"}
Rendering template within layouts/base
Rendering wiki/show
Completed in 0.11408 (8 reqs/sec) | Rendering: 0.08052 (70%) | DB: 0.00000 (0%) | 200 OK [http://redmine.jmtwo.com/wiki/jmtwo-svntest/Start]

I don't have any custom scripts on. The .htaccess is
Options +FollowSymLinks +ExecCGI
RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
ErrorDocument 500 "<h2>Application error</h2> Rails application failed to start properly" 

I don't think I have the rights, and I definably don't have the ability ;P, to install different versions of Rails.

The fix from Norguir has worked and is a very simple workaround so I'll use that! Will keep an eye on here if you would like any more diagnostics. Thanks for your help.

RE: Can't create links to other wiki pages - Added by norguir bellagio over 15 years ago

This trick gives good looking results:

 MyLink

norguir

RE: Can't create links to other wiki pages - Added by norguir bellagio over 15 years ago

Oops... forgot to escape chars:

so I meant, add &nbsp ; before the [[

    (1-5/5)