- Issue created by @quietone
- π§πͺBelgium kristiaanvandeneynde Antwerp, Belgium
One more thing to tackle when moving Book to contrib is to rename its memory cache service name. It should be
cache.book_memory
, notbook.memory_cache
as the latter leads to the ambiguous bin name "memory_cache", which could mean anything.See #3402850-12: Fix MemoryCache discovery and DX β and ListCacheBinsPass, CacheFactory after that issue lands to understand how this bin name can mess things up.
- Status changed to Active
9 months ago 3:16pm 4 April 2024 - πΊπΈUnited States nicxvan
I'm happy to create children issues if they are required, but I found some additional references to Book and since the remove Book from core has already been marked as fixed I thought I'd post them here for consideration.
I was investigating: core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php
Because it seems to be going very slow in tests and found the following.There are a lot of references to book in migration tests, but I assume most of them should remain since we can still migrate from Drupal 6 and 7 feel free to correct me if I misunderstood.
// The 'book' module provides the 'book' node type, and the migration // creates 12 node types. 'node_type' => 13,
That lead to a quick search and I also found the following that I think *should* can be cleaned up.
cspell is ignoring two non existent paths:
"modules/book/tests/fixtures/drupal6.php",
"modules/book/tests/fixtures/drupal7.php",EntityFormBuilderInterface uses book as an example:
_entity_form: node.book_outlineBlockCacheTest.php
Comment referencing book.Umami has a bunch of classy templates for book.
Let me know if any of these need follow ups, or if they have already been addressed elsewhere and should remain as is. I did try searching for other issues.
- π³πΏNew Zealand quietone
@nicxvan, thanks for the searching! It really helps to make sure that we remove everything.
Yes, make issues for the following, all as children of this isssue.
1. An issue to update cspell.json for all extension removals.
2. An issue to change all comments to not use 'book'.
3. An issue to remove the usages of book from Umami. And an issue in the Book module to get those changes.And, the speed of those migrate tests is fixed in π Reduce time of Migrate Upgrade tests by not outputting the logs by default RTBC .
- πΊπΈUnited States nicxvan
Ok I created the children issues, I was not super clear on what you meant by `And an issue in the Book module to get those changes.`
I created a stub on the book module and related it here, let me know if you meant something else.
- πΊπΈUnited States nicxvan
There are a couple more items I am unsure of:
BlockSettings.php
case 'aggregator_feed_block': [, $id] = explode('-', $delta); $settings['block_count'] = $old_settings['aggregator']['item_count']; $settings['feed'] = $id; break; case 'book_navigation': $settings['block_mode'] = $old_settings['book']['block_mode']; break; case 'forum_active_block': case 'forum_new_block': $settings['block_count'] = $old_settings['forum']['block_num']; break; case 'statistics_popular_block': $settings['top_day_num'] = $old_settings['statistics']['statistics_block_top_day_num']; $settings['top_all_num'] = $old_settings['statistics']['statistics_block_top_all_num']; $settings['top_last_num'] = $old_settings['statistics']['statistics_block_top_last_num']; break; case 'views_block:who_s_new-block_1': $settings['items_per_page'] = $old_settings['user']['block_whois_new_count']; break; case 'views_block:who_s_online-who_s_online_block': $settings['items_per_page'] = $old_settings['user']['max_list_count']; break;
Block.php
case 'aggregator': [$type, $id] = explode('-', $delta); if ($type == 'feed') { $item_count = $this->select('aggregator_feed', 'af') ->fields('af', ['block']) ->condition('fid', $id) ->execute() ->fetchField(); } else { $item_count = $this->select('aggregator_category', 'ac') ->fields('ac', ['block']) ->condition('cid', $id) ->execute() ->fetchField(); } $settings['aggregator']['item_count'] = $item_count; break; case 'book': $settings['book']['block_mode'] = $this->variableGet('book_block_mode', 'all pages'); break; case 'forum': $settings['forum']['block_num'] = $this->variableGet('forum_block_num_' . $delta, 5); break; case 'statistics': foreach (['statistics_block_top_day_num', 'statistics_block_top_all_num', 'statistics_block_top_last_num'] as $name) { $settings['statistics'][$name] = $this->variableGet($name, 0); } break; case 'user': switch ($delta) { case 2: case 'new': $settings['user']['block_whois_new_count'] = $this->variableGet('user_block_whois_new_count', 5); break; case 3: case 'online': $settings['user']['block_seconds_online'] = $this->variableGet('user_block_seconds_online', 900); $settings['user']['max_list_count'] = $this->variableGet('user_block_max_list_count', 10); break; } break;
Everything else I saw was part of Migrate, MigrateTests or block configuration for drupal 6 or 7.
Or it already has a related issue. - πΊπΈUnited States smustgrave
Composer ticket is in review π Ensure that Book does not get special core treatment Needs review
Down to 30 issues to triage in the queue, hopefully finish this weekend
Moved core documentation page https://www.drupal.org/docs/8/core/modules/book β to Contributed module documentation
- πΊπΈUnited States smustgrave
Believe we just waiting on π Ensure that Book does not get special core treatment Needs review now
- Status changed to Needs work
8 months ago 2:24am 2 May 2024 - π³πΏNew Zealand quietone
There are also questions asked in #9 that need to be answered.
For #9, BlockSettings.php is a migrate process plugin and Block.php is a migrate source plugin. it was decided to keep the migrations related to modules removed from core, In those classes there is also code for aggregator, which was removed in Drupal 10. So, there is nothing to do there.
I checked the core and book issue queue and confirmed that the issues have been moved. I checked that the docs have been moved and the URLs are correct. The docs are also in the correct menu.
Still to do
- Confirm that any change record for the Book module was moved from the core change records to the Book. I am setting this to NW for this.
- π Ensure that Book does not get special core treatment Needs review
- π³πΏNew Zealand quietone
Confirming that Book is not in the menu of Core modules. https://www.drupal.org/docs/develop/core-modules-and-themes/core-modules β
- πΊπΈUnited States nicxvan
Thanks, I missed that those were part of migrate. I think that makes sense since the other migrate pieces are staying in core.
- Status changed to Postponed
8 months ago 4:16am 2 May 2024 - π³πΏNew Zealand quietone
NP.
I searched the core change records and found some that needed to move various extensions that have been moved to contrib. So, I think that part is done.
Postponing on π Ensure that Book does not get special core treatment Needs review
- Status changed to Needs review
8 months ago 6:20am 7 May 2024 - Status changed to Fixed
8 months ago 7:10am 7 May 2024 - π³πΏNew Zealand quietone
Nice. And using
composer require drupal/book
does install book module on 11. - π§πͺBelgium kristiaanvandeneynde Antwerp, Belgium
Created π Rename book.memory_cache to cache.book_memory Active as per my comment in #2.
Automatically closed - issue fixed for 2 weeks with no activity.