- 🇩🇪Germany Anybody Porta Westfalica
Happy to review patches, seems to be a bug indeed!
- Assigned to Grevil
- 🇩🇪Germany Anybody Porta Westfalica
Or has this already been fixed in latest versions?
- 🇩🇪Germany Grevil
Ok, I tracked down the issue.
Inside "/src/Plugin/ProdCheck/Modules", different dev modules are tracked, which should be disabled for production use. Inside each class, an "init" method will initiate the prod_check entry, for the specific module. Since "devel_generate" doesn't have its own static route, the devel route was instead provided, leading to this error, as devel was uninstalled.
I am fairly unsure about these links in general, since they usually point to some random form of the referenced module. In my opinion, they should instead:
- Link to the uninstallation page of the module
- Link to help page of the module (if a help page is provided, otherwise there simply is no link)
- Or removed entirely
@Anybody, any thoughts on this?
- 🇩🇪Germany Grevil
Have a look at the MR, this approach would fix the problem for now.
Note, that I couldn't properly inject the service and my linter goes crazy with all the PHPCS issues inside this module, so it is hard to determine what the problem is.
Please review!
- Status changed to Needs review
almost 2 years ago 10:53am 3 May 2023 - last update
almost 2 years ago Build Successful - @grevil opened merge request.
- last update
almost 2 years ago Build Successful - 🇩🇪Germany Grevil
@Anybody, well, it is not quite guessing. The route is simply hard coded inside the class, see this example:
/** * Devel generate check * * @ProdCheck( * id = "devel_generate", * title = @Translation("Devel generate"), * category = "modules", * provider = "devel_generate" * ) */ class DevelGenerate extends ModulesBase { /** * {@inheritdoc} */ public function init() { $this->module = 'devel_generate'; $this->routeName = 'devel.admin_settings'; } }
- 🇩🇪Germany Anybody Porta Westfalica
If the benefit from this is low, it causes trouble and time to fix, remove what's not worth the time...
- 🇩🇪Germany Grevil
@Anybody, it won't cause trouble any more, with the patch applied. Let's commit this! It might not be perfect, but putting more time in this and refactoring the link logic isn't worth it and removing the link feature is also not good, as several classes will have an unused route parameter.
- 🇩🇪Germany Anybody Porta Westfalica
@Grevil: Then please add @todo's in all dirty parts.
- Status changed to Needs work
almost 2 years ago 7:12am 4 May 2023 - Open on Drupal.org →Core: 9.5.5 + Environment: PHP 8.1 & MySQL 5.7last update
almost 2 years ago Waiting for branch to pass - Open on Drupal.org →Core: 9.5.5 + Environment: PHP 8.1 & MySQL 5.7last update
almost 2 years ago Waiting for branch to pass - Status changed to RTBC
almost 2 years ago 7:42am 4 May 2023 - 🇩🇪Germany Anybody Porta Westfalica
Thank you @Grevil! This should be refactored in total. Not worth it now, thanks for the fix and the comments!
- Status changed to Fixed
almost 2 years ago 7:43am 4 May 2023 Automatically closed - issue fixed for 2 weeks with no activity.