Problem/Motivation

Starting from Drupal core 10.1.0, block management pages have new paths and menu items. This change directly impacts to Fixed Block Content, which specific UI options relies on the existing one from core.

Steps to reproduce

In a 10.1.0-alpha1 Drupal installation, FBC UI menu entries are not reachable at all.

Proposed resolution

Update custom UI routes, menu items and paths accordingly to D10.1 changes trying to keep D10.0.x compatibility.

Remaining tasks

Implementation, review.

User interface changes

According to changes in D10.1+

API changes

None.

Data model changes

None.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

manuel.adan created an issue. See original summary.

mathiasgmeiner’s picture

This is an initial, rough patch for Drupal 10.1 and 1.x-dev@dev.
The fixed block content can now be accessed at /admin/content/block/fixed-block-content, although it is still not visible in the user interface.

jacobbell84’s picture

Status: Active » Needs review
StatusFileSize
new13.97 KB

I built on this to hit a few more of the bullet points needed to get it committed. My patch adds the Fixed Blocks tab to the block types admin UI area. It also uses route subscribers and derivatives to alter the new routes for older versions of Drupal, maintaining backward compatibility with older versions. I did alter the routes be under the block type area instead of the block content area for Drupal 10.1. Up to manuel.adan of course but my thoughts were since this is technically configuration and not content it made more sense there. Lastly I updated the tests to hopefully work on all versions of Drupal.

jacobbell84’s picture

Updating the patch to fix composer.

jacobbell84’s picture

Taking into account new permissions in D10.1

jacobbell84’s picture

Hopefully addressing the last of the permission issues.

manuel.adan’s picture

I tested changes both in D10.0 and D10.1. I also tested in an upgraded system from 10.0 to 10.1. Tests passed OK, it seems functional and it's working as expected. Great work!

I just found some CS related issues fixed in the attached update.

Many URL have been changed, so adding redirections from the old to the new ones could be useful. Affected URLs are not public anyway, so might not have many broken links after the upgrade. Shortcuts, aliases or direct link in administration guides would be the only affected. It could be addressed now or in a new issue after this one becomes fixed.

watergate’s picture

Status: Needs review » Reviewed & tested by the community

Works like a charm on both D10.0 and D10.1 :)

Falco010 made their first commit to this issue’s fork.

falco010’s picture

Because of the hard requirement of 10.0.0 in this module we could not upgrade to 10.1

I therefor created a fork of the work done here (added patch #7) which can be used till this gets merged to be able to upgrade to Drupal 10.1

To be able to use the fork, add the following to your composer.json repositories:

        {
            "type": "git",
            "url": "https://git.drupalcode.org/issue/fixed_block_content-3357439.git"
        },

And run the following command:

composer require drupal/fixed_block_content:dev-3357439-ui-updating-to
jacobbell84’s picture

It could be addressed now or in a new issue after this one becomes fixed.

@manuel.adan My vote would be a separate issue. This is holding up a few folks doing upgrades so it would be great to get a new release out and then work on refining afterwards if redirects are still needed.

kaszarobert’s picture

I tested the patch as this blocks D10.1 upgrade right now for us. It's working fine, RTBC+

jv24’s picture

Latest patch works well - any progress on a new release to support >10.1?

juliakoelsch’s picture

I can also confirm that the patch is working. I used the fork created by @Falco101 (described in #11) to move forward with upgrading.

manuel.adan’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thank you all! Sorry for the delay, pretty busy at work these weeks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

tgoeg’s picture

Is there anything open that prevents releasing this as 8.x-1.3?
Would be nice to have a stable version covering everything needed for Drupal 10.1

ion.macaria’s picture

Agree with @tgoeg. Can we have it release cause other security tools give it like security issue beeng dowloaded from dev branch.

solideogloria’s picture

@manueladan +1 for a new release, please! People need to be able to install the module on Drupal 10.1