Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
5 Jun 2013 at 10:19 UTC
Updated:
29 Jul 2014 at 22:28 UTC
Jump to comment: Most recent file
Comments
Comment #1
mcjim commentedRemoved drupal_add_css from template_preprocess_book_navigation().
CSS is #attached in three different places:
In book_node_view() for the navigation below the node.
In BookNavigationBlock twice, for the block shown on all pages and the block only shown on book pages.
Comment #2
mcjim commentedActually, scratch that. The CSS is not needed by the blocks at all. Re-rolling…
Comment #3
mcjim commentedRe-rolled. CSS is #attached only in book_node_view().
Comment #4
tstoecklerCode looks good. This needs manual testing, however, to verify that the CSS is still being applied in all cases.
Comment #5
ekl1773Steps taken to test:
However, when I go to edit a book page (but NOT an article) or view the outline, the following error appears above the edit box:
Comment #6
mcjim commentedThank for the thorough review!
I don't think those notices have anything to do with this patch (might even be related to #2012920: Add child page link in book navigation does not insert parent into book outline), but will check them out.
Comment #7
tstoecklerSo can someone reproduce the problem without the patch?
Comment #8
mcjim commentedRe-rolled patch to keep up with HEAD.
re: #5 and #7
I think it's something to do with caching.
Can you try this:
1) Pull latest changes.
2) Apply patch
3) Do a clean install (will need to remove sites/default/files/php and sites/default/files/config_*, first).
4) Test creating a book.
I've just done this and have no errors.
Comment #9
mcjim commentedDid that forgetting to upload the patch, thing…
Comment #10
ekl1773Yes, tested on clean copy of 8.x, aforementioned error exists irrespective of this patch.
Pulled, applied, wiped sites/default/files etc, tested as above.
Some CSS appears to have loaded, but book.theme.css throws a 404 error when selected in the resources tab and the elements report that they're drawing CSS from themes/bartik, which does not include the subelement selectors like "next" and "up."
Either needs re-rolling or it's me?
Comment #11
mcjim commentedAh, the 404 is explained by http://drupalcode.org/project/drupal.git/commit/2432c02 which moved the CSS.
Rerolled!
Comment #12
ekl1773Ok, that appears to work, book.theme.css loads, elements are displayed accordingly, tested with several content types. Ditto above, but additionally: success!
Comment #13
catchCommitted/pushed to 8.x, thanks!