Wrong style file in chm documentation (original) (raw)

Bug #66408 Wrong style file in chm documentation
Submitted: 2014-01-03 21:00 UTC Modified: 2014-03-26 15:19 UTC Votes:40 Avg. Score:4.7 ± 0.7 Reproduced:38 of 38 (100.0%) Same Version:5 (13.2%) Same OS:5 (13.2%)
From: kulakov74 at yandex dot ru Assigned: bjori (profile)
Status: Closed Package: Doc Build problem
PHP Version: Irrelevant OS: Windows
Private report: No CVE-ID: None

[2014-01-03 21:00 UTC] kulakov74 at yandex dot ru

Description:

The pages in the englign enhanced PHP documentation (chm, 3 Jan 2014, downloaded from http://www.php.net/download-docs.php) look like they have no style applied. Looking at the contents of a page I see a stylesheet href="style.css" but when I try to open its URL in the browser I get an html page instead (looks like the left panel) with a couple of css lines in the end.

I would also appreciate if the pages had an extra style sheet - an external one - so I (anyone) could customize the documentation the way I want.

Test script:

Expected result:

Actual result:

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports

[2014-01-03 21:02 UTC] kulakov74 at yandex dot ru

-Summary: Wrong style file +Summary: Wrong style file in chm documentation

[2014-01-03 21:02 UTC] kulakov74 at yandex dot ru

fixed the title

[2014-01-03 21:04 UTC] kulakov74 at yandex dot ru

englign = english (sorry)

[2014-01-03 21:28 UTC] bjori@php.net

-Type: Documentation Problem +Type: Bug -Package: Documentation problem +Package: Doc Build problem

[2014-01-03 21:28 UTC] bjori@php.net

We are probably fetching the old (non-existing) stylesheets

[2014-01-12 20:15 UTC] kulakov74 at yandex dot ru

Just FYI. I managed to decompile the chm file, replaced all style.css to file:///C:/Help/PHP/style.css, removed the manual sections I don't need (so I got 8300 files instead of over 13000) and recompiled the project with HTML Help Workshop. I also made some custom styles in style.css for me to make to manual look decent.

Also I found these problems (I think not worth reporting extra bugs): -in HTML Help Edition (the very last topic), "Specialities of this Edition" and "Skin development" are outdated. -in "Integrating the PHP Manual" the manual pages URLs should be fixed to the current scheme (res/). -dotnet.intro.html should be renamed to intro.dotnet.html (like other intros) -typo: "Inclusion hierarchy viewer" is presented as "inclued" in TOC

[2014-01-13 20:26 UTC] bjori@php.net

Since I don't have a way of viewing the CHM, would you mind making a screenshot of how it looks with your CSS? I'd be very interested in using it.

-in HTML Help Edition (the very last topic)

Fixed

-in "Integrating the PHP Manual" the manual pages URLs should be fixed to the current scheme (res/).

I'm unsure what this means

-dotnet.intro.html should be renamed to intro.dotnet.html (like other intros)

Nice catch, thanks

-typo: "Inclusion hierarchy viewer" is presented as "inclued" in TOC

This is correct. The actual name of it is 'inclued', see http://pecl.php.net/package/inclued

[2014-01-13 20:28 UTC] bjori@php.net

Ohh, found the "Integrating the PHP Manual" chapter... But what are the actual paths? I don't know what this is trying to say :P

[2014-01-14 19:28 UTC] kulakov74 at yandex dot ru

I'm not a pro web designer so my css is a bit amateur and incomplete, but it makes the docs look much better anyway. Making a css like that is really not a big deal, I'm sure many users might want to make their own themes if they get a chance. Try http://postimg.org/gallery/2mtnini2/307caf81/ to see the 4 shots I made (chm 1-4). I can send the whole chm along with the css if you want to try it.

in "Integrating the PHP Manual" this: mk:@MSITStore:C:\phpmanual\php_manual_en.chm::/_index.html should be fixed to this: mk:@MSITStore:C:\phpmanual\php_manual_en.chm::/res/index.html

[2014-02-18 00:15 UTC] em dot dev at outlook dot com

style.css got corrupted somehow, so I went on investigating. After decompiling it, I managed to get to that style. As it turns out, it's not a style.

Luckily I kept the 2013-12-21 version. Unpacked this one as well, and it contains a proper style sheet.

The recent 2014-02-13 chm contains a style.css mixed up with a 5.4.25 documentation page: "PHP Function List styles/site.css doesn't exist. Closest matches:"

Where the older style.css contains only css declarations.

So it's best to check what goes on when compiling these chm's 'cause in the past there were a lot of these issues with styles.

Side note: I see amqp and skins were removed, prob. others too. Why? Aren't they not used anymore.

[2014-03-11 01:41 UTC] em dot dev at outlook dot com

I see on the 7th a new chm was compiled, but whoever did it completely disregarded my previous post.

Nicely done lads, nicely done!

THE STYLE.CSS IS CORRUPTED!!!

[2014-03-13 09:44 UTC] andy at andy-burton dot co dot uk

Also having this problem having downloaded the latest chm today from php.net, running windows 8.1

[2014-03-14 12:50 UTC] olegin2310 at mail dot ru

Version of manual from March 14, 2014 style.css file is still wrong.

[2014-03-25 18:44 UTC] andy at andyburton dot co dot uk

I've had fun working out how this process works :)

The most simple fix is to just add the new themes to the config in https://github.com/php/phd/blob/master/phpdotnet/phd/Config.php

'css' => array ('theme-base.css', 'theme-medium.css')

This then loads both and compiles them into a single style.css file which is used in the CHM.

Is this config used for other builds, and so safe to change?

Andy

[2014-03-25 23:15 UTC] bjori@php.net

Interesting fix andy.

This config only provides defaults for any project using PhD (Facebook, PEAR, ...), so it can be overwritten however people want.

Are you sure that fix is enough? We have the domain and everything else hardcoded?

[2014-03-26 12:32 UTC] andy at andyburton dot co dot uk

Indeed - i have made some class changes to better fix the problem for both epub and chm which seem to have worked well.

I've also extended it to take the google embedded fonts as it does on the php docs site and store them locally, as it does with images.

I like the config solution as it says "use these php defaults, unless you specify otherwise". It seems unnecessary to hard-code multiple stylesheet paths into the classes as they were previously, and to provide anything other than an absolute fall-back (which i've kept with theme-base.css).

Is the same phd repo being used by PEAR, FB etc? If so then i presume they will not want the php.net css files in the config?

[2014-03-26 15:19 UTC] bjori@php.net

-Status: Open +Status: Closed -Assigned To: +Assigned To: bjori

[2014-03-26 15:19 UTC] bjori@php.net

The fix for this bug has been committed. Since the websites are not directly updated from the repository, the fix might need some time to spread across the globe to all mirror sites, including PHP.net itself.

Thank you for the report, and for helping us make PHP.net better.

I don't know what facebook plans are, they just forked the repo. They currently don't provide chms so dunno.

I didn't realize the paths to the css file were so hardcoded anyway, so it would be fairly broken for anyone trying to customize it anyway.

The fix looks good, and has been merged! https://github.com/php/phd/commit/881f6f382056a4246f2be9627b00a84599fb862b

Thank you !

[2014-04-23 23:39 UTC] peci1 at seznam dot cz

For those not wanting to wait for the official version to appear on php.net, I've built the CHM files myself (both normal and enhanced) using the fixed stylesheet. Feel free to download.

https://app.box.com/s/4legzm0vijhk6t7qshcu