On Dec 16, 2012, at 12:41 PM, Rob Weir wrote:
> On Sun, Dec 16, 2012 at 2:47 PM, Andrea Pescetti <[email protected]> wrote:
>> I had a long discussion with Infra today trying to find out why a change I
>> had applied was not appearing. Analyzing it, it turns out that we have a
>> problem already visible on over 400 pages and related to .htm files (as
>> opposed to .html files).
>>
>> Reproducing is easy:
>> 1) Edit a .htm file, e.g., do this:
>> http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/content/pt/about/newsletter.htm?r1=1413471&r2=1422592&diff_format=h
>>
>> 2) Publish the changes and you get file duplication:
>>
>> http://www.openoffice.org/pt/about/newsletter.htm
>> (the existing URL, ending in .htm, not updated)
>>
>> http://www.openoffice.org/pt/about/newsletter.html
>> (a new URL, containing the fix)
>>
>> This silent change of URLs is quite scary and we already have 401
>> "duplicate" pages. For other examples see
>>
>> http://www.openoffice.org/fr/Documentation/liens.htm
>> http://www.openoffice.org/fr/Documentation/liens.html
>>
>
>
> When I build locally I see that input htm files are published as html
> files. But I don't see any duplications. Maybe the duplicates are
> just left over from earlier?
Exactly.
From path.pm
[qr!\.html$!, html_page => { template => "html_page.html" }],
[qr!\.htm$!, html_page => { template => "html_page.html" }],
r1221295 | wave | 2011-12-20 06:52:47 -0800 (Tue, 20 Dec 2011) | 1 line
Wrap .htm files like .html. Comment a couple of PayPal references. The page
"donate-thanks.html" states that it is landing page after PayPal donations to
TOO - changed to request donations to the ASF. (Not sure if it is still used.)
Daniel example was from three hours prior on Dec. 20, 2011.
I think that we can purge these *.htm duplicates, but if we do it will be a
"sledgehammer" build.
>
>
>> or
>>
>> http://www.openoffice.org/ui/proposals/Readonly_mode.htm
>> http://www.openoffice.org/ui/proposals/Readonly_mode.html
>>
>> Daniel Shahaf, who investigated the problem, suggests that we take a look at
>> our path.pm.
>>
>> Looking at it, I think the place to start investigating is line 14 of
>> http://svn.apache.org/viewvc/openoffice/ooo-site/trunk/lib/path.pm?revision=1413471&view=markup
>> which seems to actually turn .htm files into .html files, but it's probably
>> best that someone familiar with the CMS does the change, since I definitely
>> don't want to break the website.
It was intentional. Before doing so we would need to make a group decision
about how to treat the two types of files.
[qr!\.html$!, html_page => { template => "html_page.html" }],
[qr!\.htm$!, html_page => { template => "html_page.html" }],
Note that this will change htm to html just like the folllowing mdtext files
are changed into html:
[qr!doctype.mdtext$!, single_narrative => { template => "doctype.html"
}],
[qr!brand.mdtext$!, single_narrative => { template => "brand.html" }],
[qr!footer.mdtext$!, single_narrative => { template => "footer.html" }],
[qr!topnav.mdtext$!, single_narrative => { template => "navigator.html"
}],
[qr!leftnav.mdtext$!, single_narrative => { template =>
"navigator.html" }],
[qr!rightnav.mdtext$!, single_narrative => { template =>
"navigator.html" }],
[qr!\.mdtext$!, single_narrative => { template =>
"single_narrative.html" }],
There are two different procedures from view.pm used:
single_narrative and html_page.
There are several templates used from templates/.
html_page.html
single_narrative.html
navigator.html
doctype.html
brand.html
footer.html
Regards,
Dave
>>
>> Regards,
>> Andrea.