avpaderno → credited aimevp → .
While working on implementing a patch from another issue I was surprised to see that only a small portion of the patch provided in #6 got merged to dev. Since I wanted to incorporate these changes on an active project I started working on a re-roll of that patch and then noticed the dependency injection fixes were done incorrectly (or maybe they were for D9 but are no longer for D10). So I combined all these changes + some code style improvements into a new patch which works and has been tested on a Drupal 10.3.6 install. However I'm not sure how this patch would behave on a Drupal 9.x install or if this requires a version bump of the pdf module then?
On my project I was using the patch from #2 which was working perfectly until I wanted to install the patch from issue #3364326 as well. But since the patch from #3364326 has already been merged to dev current patch would need an update anyway in order to get merged in the future. So here is an updated version for the dev branch.
Re-rolled the patch for 2.x version of the module where it is working as well once applied.
I'm a bit confused what to do now because clearly the code wasn't working as intended in my case. People who had node edit permission (without create permission) within a group were unable to create new media. Has this been tested in that manner? Or can you think of a reason (bad configuration for example) why this isn't working in my project?
I'm trying to making a merge request but can't figure out why I keep getting access denied in git. So for now here's a patch file...
The patch from #10 would no longer apply for my D10.1.7 installation where I was using it. This is the updated version which applies again on the latest 10.1.x.
Here's a patch for the theme to get it D10 compatible. It fixes the info.yml, the rector suggestion from
issue 3297725 →
, the libraries.yml and the javascript which was using jquery.once() which is deprecated in D10 and replaced by a core alternative.
The only thing which is not possible to fix with a patch is the version constraint in the composer.json. I was able to bypass this by using the mglaman/composer-drupal-lenient composer plugin. Just install the plugin and add this in the extra section of your project composer.json:
"drupal-lenient": {
"allowed-list": ["drupal/newsplus_lite"]
}
Upgrade status will show everything is ready to go and for me the upgrade to D10 with this theme went without a problem.
If Focal Point is no longer depending on the contrib module jquery_ui and jquery_ui_draggable, shouldn't this fix have included the removal of the dependencies in the composer.json file as well then?
I get that the patch was not the correct way to fix the issue but nevertheless there's still an issue in Ctools when using this feature on D10 because D10 no longer has the class "Drupal\Node\\Plugin\\Condition\NodeType". It was removed as stated in the deprecation message. Imho Ctools is not D10 compatible as it generates errors trying to read this deprecated condition plugin. We need a patch that removes this plugin instead of renaming use statements etc...
This is the error I get when I try to create a new "entity_view (Content) block:
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /admin/structure/block/add/entity_view
StatusText: 500 Service unavailable (with message)
ResponseText: The website encountered an unexpected error. Please try again later.
Error: Class "Drupal\Node\\Plugin\\Condition\NodeType" not found in include() (line 19 of modules/contrib/ctools/src/Plugin/Condition/NodeType.php).
Composer\\Autoload\\{closure}() (Line: 427)
Composer\\Autoload\\ClassLoader->loadClass()
ReflectionClass->;__construct() (Line: 94)
Drupal\\Component\\Plugin\\Discovery\\AttributeClassDiscovery->getDefinitions() (Line: 55)
Drupal\\Core\\Plugin\\Discovery\\AttributeDiscoveryWithAnnotations->getDefinitions() (Line: 86)
Drupal\\Component\\Plugin\\Discovery\\DerivativeDiscoveryDecorator->getDefinitions() (Line: 309)
Drupal\\Core\\Plugin\\DefaultPluginManager->findDefinitions() (Line: 194)
Drupal\\Core\\Plugin\\DefaultPluginManager->getDefinitions() (Line: 23)
Drupal\\Core\\Condition\\ConditionManager->getDefinitionsForContexts() (Line: 21)
Drupal\\Core\\Condition\\ConditionManager->getFilteredDefinitions() (Line: 229)
Drupal\\block\\BlockForm->buildVisibilityInterface() (Line: 129)
Drupal\\block\\BlockForm->form() (Line: 106)
Drupal\\Core\\Entity\\EntityForm->buildForm()
call_user_func_array() (Line: 536)
Drupal\\Core\\Form\\FormBuilder->retrieveForm() (Line: 283)
Drupal\\Core\\Form\\FormBuilder->buildForm() (Line: 48)
Drupal\\Core\\Entity\\EntityFormBuilder->getForm() (Line: 27)
Drupal\\block\\Controller\\BlockAddController->blockAddConfigureForm()
call_user_func_array() (Line: 123)
Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->Drupal\\Core\\EventSubscriber\\{closure}() (Line: 583)
Drupal\\Core\\Render\\Renderer->executeInRenderContext() (Line: 121)
Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->Drupal\\Core\\EventSubscriber\\{closure}() (Line: 166)
Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw() (Line: 74)
Symfony\\Component\\HttpKernel\\HttpKernel->handle() (Line: 58)
Drupal\\Core\\StackMiddleware\\Session->handle() (Line: 48)
Drupal\\Core\\StackMiddleware\\KernelPreHandle->handle() (Line: 61)
Drupal\\tkp_forgerock\\StackMiddleware\\ForgerockHeaders->handle() (Line: 48)
Drupal\\Core\\StackMiddleware\\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\\Core\\StackMiddleware\NegotiationMiddleware->handle() (Line: 51)
Drupal\\Core\\StackMiddleware\\StackedHttpKernel->handle() (Line: 704)
Drupal\\Core\\DrupalKernel->handle() (Line: 21)
I've also changed this to major because I'm guessing this is breaking for sites that use this and upgrade from D9 to D10.
Included is a patch (compatible for v4) which removes the plugin.
Maybe what we really need asap is a dev version of 4.1.x or 5.x (only D10+ compatible) where this plugin has been removed.