🇳🇱Netherlands @ecvandenberg

Account created on 27 May 2010, about 14 years ago
#

Recent comments

🇳🇱Netherlands ecvandenberg

MegaChriz, you are the best!
That really makes sense. In the past I wasn't aware of this effect. And indeed I see the cardinality: 1 in the config files.
That makes me think what else might be mixed up in my sites...

Many thanks for your quick response.

🇳🇱Netherlands ecvandenberg

Hi Manual, we use nodes with up to 600 paragraphs! Well...we are expecting 600 paragraphs. We are now around 250. It all seems to work fine, but we are experiencing issues too.
We have many users that own this type of node and can add paragraphs. Some of them experiencing that not all newly added paragraphs are stored, when saving the node. They must save after every paragraph added to be sure it's stored.

I try to get it more clear but can not reproduce yet. I bumbed into this issue, perhaps it's related.

🇳🇱Netherlands ecvandenberg

Patch #14 seems to work fine here with multiple access modules and a complex structure of access rights and workflows.

🇳🇱Netherlands ecvandenberg

Yes, that looks much better :-)

Thanks for this nice module and getting it Drupal 10 compatible!

🇳🇱Netherlands ecvandenberg

Thanks Kobe! The patch applies cleanly to the 3.0.0-alpha1 version. Still on a Drupal 9 site.

And the breakpoints work very well. Nice!

Now let's see if all works fine after upgrade to Drupal 10...

🇳🇱Netherlands ecvandenberg

I use this function now for some time and it works great. Preparing for migration to D10 and this patch seems to still do the trick with the latest search_api_location dev version. Can not use the alpha version due to issue 3048597.

🇳🇱Netherlands ecvandenberg

I could use this too. If you let me know when you have a first patch I'm happy to test it.

🇳🇱Netherlands ecvandenberg

You are lightning fast!

One problem...I think the other (related) patch is also required. But they can not apply on top of each other.

🇳🇱Netherlands ecvandenberg

Thank you very much!

It seems to work fine over here.
Although I got this error:
https://www.drupal.org/project/commerce/issues/3304747 🐛 RuntimeException: Failed to start the session because headers have already been sent by Response.php Active
Not sure if this has anything to do with Mollie though...

Are you able to create a patch file?

🇳🇱Netherlands ecvandenberg

For those who look for this solution, I have tried the function in #17 but that didn't work. Now, I'm not a good module developer, but with some help from the chatbot I came to this module. It also adds a permission setting View all media.

my_module.module:


use Drupal\views\ViewExecutable;
use Drupal\views\Plugin\views\query\Sql;

/**
 * Implements hook_views_query_alter().
 */

function my_module_views_query_alter(ViewExecutable $view, Sql $query) {
  if ($view->id() == 'media_library') {
    $user = \Drupal::currentUser();
    $user_roles = $user->getRoles();

    // Check if the user has "View all media" permission.
    if (in_array('administrator', $user_roles) || $user->hasPermission('View all media')) {
      return;
    }

    $query->addWhereExpression('AND', 'media_field_data.uid = :current_user_id', [':current_user_id' => $user->id()]);
  }
}

And my_module.permissions.yml:

View all media:
  title: 'View all media'
  description: 'View all media in the media library widget'

🇳🇱Netherlands ecvandenberg

I tried the patch in a Drupal 9.5.10 site with autologout 8.1.4 and php 8.1.21.
The warnings are gone.

🇳🇱Netherlands ecvandenberg

And thank you for a quick fix!
It works in a fresh D10 website, but with some remarks.
When you add or remove a node type at /admin/config/system/reference-access it immediately has effect to the user trying to get access. I simulate this by having a private browser window with the dedicated user logged in and trying to access the restricted node.
But when you change the specific nodes the user should have access to, that does not has effect before clearing all cache.

In an older D9.5.10 it works partly. Add or remove a node type at /admin/config/system/reference-access it immediately has effect.
But adding a specific nodes to a user does not have any effect. The access stays forbidden.

I do not see any errors in the CMS log. If you have any hints in how I could debug this better please let me know.
This site used to have other access modules like access by term. But these are all uninstalled now.

🇳🇱Netherlands ecvandenberg

Patch #9 works for me on Drupal 9.5.9 and Textfield Counter 2.1.0

I now have four patches on this module. Do hope we get a stable version with all R&TBC patches in it...

🇳🇱Netherlands ecvandenberg

I tried to install the latest dev. Altough I do not understand #75 fully I think I run into the same issue.
Downloading the latest dev with drush does not work.

$ drush dl search_api-7.x-1.x-dev
copy(): Filename cannot be empty drush.inc:768                                                           [warning]
Unable to download search_api to  from .    
🇳🇱Netherlands ecvandenberg

PHP 7.4.33, Core 9.5.3, Webform 6.1.4, Entity print 8.x-2.11
with patch #2 works for me.

Production build 0.69.0 2024