ikiwiki/doc/bugs/pages_missing_top-level_dir...

79 lines
3.0 KiB
Plaintext
Raw Normal View History

Hi,
I've rebuilt two sites now, and anything that requires a working directory structure isn't working properly. I have no idea how it's doing this. I don't see anything in my templates, and I haven't messed around with the back-end code much.
An example would show this best I think.
<pre>
/ <- root of site
/About/ <- sub-directory
/Policy/ <- sub-sub-
</pre>
When you're on /About/, any generated links get mapped to /Policy/ and NOT /About/Policy/ - of course this results in a 404 error.
I used to be able to use relative links or absolute ones to get the links I want, and now I can't do either. The generated link results in a 404 due to the stripping of a directory.
I don't know if it's related to the fact that I have one ikiwiki install under another (/blog/ under / is also ikiwiki), but both are FUBAR.
2009-10-19 11:42:09 +02:00
> what do you mean by generated links: do you mean the output of
> [[ikiwiki/wikilink]]s? Or are you generating links some other way?
> When you say "on /About/, any generated links get mapped to
> /Policy/ and NOT /About/Policy" can you provide an example of what
> source generates the link? -- [[Jon]]
2009-10-21 22:48:20 +02:00
2009-10-22 01:33:20 +02:00
>> No, a \[[map]] call, such as:
>>
>> (actual code)<br />
>> = = = = =<br />
>> \[[!map pages="About/*" show="title"]]<br />
>> = = = = =<br />
>>
>> The end result is:<br />
>> (actual code)
>>
<pre>
&lt;div class="map">
&lt;ul>
&lt;li>&lt;a class="mapitem" href="./Policy/">Policy&lt;/a>
&lt;ul>
&lt;li>&lt;a class="mapitem" href="./Policy/Microblog/">Microblogging subscription policy&lt;/a>
&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;/div>
</pre>
2009-10-21 22:48:20 +02:00
> I'm also confused about what is generating the links. The map directive?
2009-10-22 01:33:20 +02:00
> You? --[[Joey]]
>> see above :)
2009-10-22 01:36:21 +02:00
>> I suspect this is due to git scanning everything under the pwd of the .git/ directory, but not totally so.
>>> Ikiwiki never, ever, looks in directories with names starting with a
>>> dot. --[[Joey]]
2009-10-22 01:36:21 +02:00
>> Other ikiwiki sites I have don't do this, and work OK, on the same server, but different docroots.
2009-11-06 14:21:25 +01:00
>>> Well, I've moved my blog to under my site's docroot - in terms of git
>>> and ikiwiki - and it's still cutting out a whole directory level. I
>>> have no idea what's going on. I need to check the code. The site is at
>>> http://simonraven.kisikew.org/ - if you follow the "About" link, you'll
>>> understand exactly what's going on, if you look at the URL in your
>>> status bar (or under your cursor if you're using a text browser).
2009-11-06 14:21:25 +01:00
>>>> Your page contains the following in its html:
>>>> `<base href="../" />`
>>>>
>>>> Given a link like "./Policy/", which is *correct*, and when on the
>>>> About page will normally link to the About/Policy page, this causes
>>>> the link to really link to ".././Policy/" which is of course broken.
>>>>
>>>> Ikiwiki's standard page templates do not contain this base tag, so
>>>> I guess your customised templates are broken. --[[Joey]] [[done]]
2009-11-09 06:13:09 +01:00
>>>>> I totally forgot about that tag... good catch. I was thinking it was my template that was broken, since yesterday, but I couldn't see what. Thank you very much for your eyes.