SID-02347: Create new topic is not correctly redirecting.
| Status: |
Asked |
TWiki version: |
6.0.2 |
Perl version: |
5.20 |
| Category: |
CategoryTemplates |
Server OS: |
gentoo |
Last update: |
7 years ago |
On my production instance,
WebCreateNewTopic redirects to view/ instead of edit/ AND this on a seperate web.
I cannot fix this. I have no idea when it started, or how to revert this behavior. We have live with this for so long, that there is no backup which may contain working files.
Here the behavior in PROD
This will redirect to:
https://wiki.example.com/twiki/bin/view/NewWeb/WebCreateNewTopic?topicparent=WebHome
This
https://wiki.example.com/twiki/bin/view/FirstWeb/?onlynewtopic=on&nowysiwyg=0&topic=MyShinyNewTopic&topicparent=WebHome&templatetopic=
On a TEST machine I see the error, and with URL hacking I can see it works the same on PROD
http://wiki-test.example.com/twiki/bin/view/Sandbox/WebCreateNewTopic?topicparent=WebHome
Redirects to
http://wiki-test.example.com/twiki/bin/edit/Sandbox/?onlynewtopic=on&nowysiwyg=0&topic=MyShinyNewTopic&topicparent=WebHome&templatetopic=
Any ideas?
--
Shawn Beasley - 2018-02-19
Discussion and Answer
It depends on whether and what customizing has been applied to your TWiki in the past... maybe even in an older version if TWiki? The default behaviour of TWiki 6 is defined by the topic
TWiki.WebCreateNewTopicTemplate (on twiki.org:
WebCreateNewTopicTemplate), but this behaviour can be overridden in quite a few places. The whole story is documented in
TWikiTemplates, section "Finding Templates".
The topic you should investigate first is
TWiki.WebCreateNewTopicTemplate, or whether you have a topic with the same name in your
NewWeb web, or topics ending in
SkinWebCreateNewTopicTemplate. Check whether the file has a revision history in your TWiki, and compare it with one directly from the download.
Another location to check is your templates directory: look for a file
WebTopicCreate.tmpl or
WebTopicCreate.*.tmpl.
If that still doesn't provide a clue, the configuration setting
{TemplatePath} (an "EXPERT" setting under "Miscellaneous settings"): It has a list of directories (beginning with absolute paths) and topics (beginning with
$web). Compare that to the list in
TWikiTemplates, check whether there are "unwanted" entries in this list.
Oh, and there's also the very remote chance that there's a web server redirection in place (but who would implement such a strange thing?).
--
Harald Jörg - 2018-02-19
I diff'd both systems, broken left and working right
https://d.pr/i/IHaYGO
and it seems they have the same files. I will have to dig further, but still am soooo lost where this could be going wrong.
--
Shawn Beasley - 2018-02-19
Hi Harald, there is a redirect in place.
It redirects /$ to a sepcifc web.
The reason is they want to have a specific web as starting web. Can you help there?
--
Shawn Beasley - 2018-04-16
This single redirection (which I assume to be some
RedirectMatch directive in Apache's configuration) might be a clue, but I can't figure out how this can lead to the symptoms you are observing. We're now leaving TWiki space and entering the Apache and HTTP zone. Here are some ideas to collect diagnostic information:
- Apache's access log should have entries for the redirections. You can fiddle with the
LogLevel directive of Apache to get more information.
- Instead of using a browser, you can use the
HEAD command (which comes with libwww-perl) to check which URLs are redirected and which aren't. Check the result of HEAD https://wiki.example.com/twiki/bin/edit/NewWeb/.
--
Harald Jörg - 2018-04-16
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.