Account created on 18 December 2012, over 12 years ago
#

Merge Requests

Recent comments

🇺🇸United States jcontreras

Try updating the module to 2.2, run database updates, clear the cache, and see if that fixes the issue.

🇺🇸United States jcontreras

@trevjs - I came across this issue on my setup. Your suggestion worked so I created a custom module to run an update and do this for my local and live setup so I don't encounter this issue.

/**
 * Drops the linkchecker triggers if they exist.
 */
function custom_module_update_8001() {
  $database = \Drupal::database();

  // List of triggers to drop.
  $triggers = [
    'linkchecker_link_der_update',
    'linkchecker_link_der_insert',
  ];

  foreach ($triggers as $trigger) {
    try {
      $database->query("DROP TRIGGER IF EXISTS {$trigger};");
      \Drupal::logger('custom_module')->notice("Dropped trigger: {$trigger}");
    } catch (\Exception $e) {
      \Drupal::logger('custom_module')->error("Failed to drop trigger {$trigger}: " . $e->getMessage());
    }
  }
}
🇺🇸United States jcontreras

This was an old issue fixed in 2.1.2, I ran a test and did not have that issue.
Are you sure you are on version 2.1.2 or 2.2.0 and _not_ in 2.1.1?

🇺🇸United States jcontreras

I moved this to 2.2.0-alpha2 - please review.

🇺🇸United States jcontreras

D11 on 2.1.2-alpha1 - Please review and let me know if it's all good, and I'll move it to a stable release is good.

🇺🇸United States jcontreras

Hi @super_romeo - Sorry It's been a crazy week last week and will continue on to the next week. I am working on a large project with crazy deadline. I took a quick glance at you changes, and it looks really good.

Since you did a lot of changes, I'll have to take closer look, pull it all and run some tests and if all good I'll do the merge.

I'll see if I can carb some time tomorrow as of today I still got a lot to do. Thank you so much for your time on this.

🇺🇸United States jcontreras

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

🇺🇸United States jcontreras

What are your patterns on that block?

🇺🇸United States jcontreras

There is no other way it has to be in order.

So both examples are not correct, first, you set the allowed or not-allowed setting as you need, The exclusion is to override any previous path patterns.

Your examples should be:

A)
configuration is set to: [x] Hide on pages :
/order/*/*
!/order/*/complete

B)
configuration is set to: [x] Show on pages:
/order/*/* <-- This will display your block on paths with this pattern
!/order/*/complete <-- and this will exclude this specific path pattern, overwriting previous pattern

But based on your original logic I think what you want is this:

configuration is set to: [x] Show on pages:
/order/* <-- will display on ay page after order/
!/order/*/* <-- exception will hide on any page after order/*/
/order/*/complete <-- This will take over the exception allowing the block to display on /order/*/complete page

🇺🇸United States jcontreras

You are correct, I refined the access adjustment to the block for viewing only as it was altering some admin functions as well.
Please update to the latest 2.2.x-dev and let me know if it works this time.
( you may have manually delete the module's folder from the contrib modules on your setup to force to update.)

🇺🇸United States jcontreras

@super_romeo - I created a new major version for this as there was a lot to rewrite to accomplish this and fixed some other issues.
Please try it and let me know if this worked for what you intended.

🇺🇸United States jcontreras

I see what you mean. I think your point is very valid. I will follow up with a new update soon to allow linear exclusion.

🇺🇸United States jcontreras

! is to exclude the previous wild card pattern.

For what you want to do, make sure you have the "Hide for the listed pages" checked then:

/foo/*
!/foo/bar

🇺🇸United States jcontreras

I attended as mentor, representing Texas Creative from San Antonio. TX.

🇺🇸United States jcontreras

I want to be a maintainer for this module as it has not been maintained since D7. I already have code ready for D9 and D10 as I needed this module for a project I am currently working on.

🇺🇸United States jcontreras

I was having the same issue~ I have a large number of paragraphs field using this so I just create a patch that checks for the "label" index, if not set, else set to "hidden". seems to work fine for my case.. if anyone needs it.

🇺🇸United States jcontreras

I added this to "2.x-dev", please test with the dev version and let me know if it works for you.

🇺🇸United States jcontreras

I don't know what I did but it started working ~

🇺🇸United States jcontreras

#22 - I can confirm that removing parent: menu.active_trail in the gin_toolbar.services.yml manially, and clearing the cache fixes the issue for me.

🇺🇸United States jcontreras

Your patch fixed teh issue and I was able to run the updates. Thank you!

🇺🇸United States jcontreras

Update to Drupal 10.1 - On this new version drupal is limiting the syntax of the URLs that can get added to the page's settings. As a temp fix, I have created a patch that can be used until I create a rewrite of the method via this module (in the works).

Use this patch for now.
https://www.drupal.org/project/drupal/issues/3375092#comment-15153306 💬 Drupal 10.1 + Rejecting paths not conforming to standard URL's set by Drupal Postponed: needs info

Because of this there are significant changes to the module and may move towards an OOP strategy and add a lot more to make this work. The reason why it can not exist on both old D9 vs D10. both will work very differently and affect the site in different ways.

For that reason, if you are in the middle of upgrading to D10 use this on your composer:
"drupal/block_exclude_pages": "~2.0 || ^2.1@beta"

🇺🇸United States jcontreras

I have been trying to overwrite the "validateForm()" method on class Drupal\block\BlockForm in my .module file...
I tried creating an instance of "BlockForm" but I get an error:
ArgumentCountError: Too few arguments to function Drupal\block\BlockForm::__construct()
All variables to pass are protected and I can't figure out how to initiate this method..

Any help on how I would go about rewriting all these validations?

🇺🇸United States jcontreras

Ok, I'll try and figure out overwrite the method via the module. In the main time, I'll keep this patch active on the link above for those that need it on Drupal 10. I'll close it when I have the validation overwritten on my part and the new version of this module loaded. Thank you.

🇺🇸United States jcontreras

I am still kinda new to OOP and overwriting methods. I'll see if I can figure it out.

🇺🇸United States jcontreras

Block Exclude pages is been used on a little over 6000 sites, from drupal 7 to now. I came up with that a few years back because there was nothing to meet the need of excluding/negate specific pages. And yes I guess we can say I "invented" that syntax as it was allowed before in the validation making it more flexible and it worked just fine, but now I have no way to fix it other than doing this.

🇺🇸United States jcontreras

If there is a better way to overwrite the URL limitation via the contributed module rather than patching the Drupal core please advise. Thank you.

🇺🇸United States jcontreras

@cilefen -
in /core/modules/system/src/Plugin/Condition/RequestPath.php

if (empty($path) || $path === '<front>' || str_starts_with($path, '/')) {
🇺🇸United States jcontreras

@tyler-durden - I have tested and I can confirm that my block is showing on the right pages and not showing where it's not supposed to.
have you updated the module to the latest of this issue "2.1.0-beta2"?

🇺🇸United States jcontreras

@Iarowlan -
Starting Drupal 10.1 there are some constraints added to pages settings in blocks, that only allow strings "" and anything beginning with a forward slash "/", there for limiting the use of this settings section. Block Exclude Pages module uses a "!" at the beginning of URLs on pages settings to exclude some pages when a wild card is used.

This is to try and figure out a solution to fix the issue https://www.drupal.org/project/block_exclude_pages/issues/3372696 🐛 D10 Warning when enabling path with exclusion Needs review

🇺🇸United States jcontreras

Sorry, this was supposed to be a pplied to 10.1.x version

🇺🇸United States jcontreras

As I suspected it has to do with Drupal core. I created a patch for now till I can figure out a cleaner way to fix this.

Apply Drupal core patch and please let me know if that works for you:

https://www.drupal.org/project/drupal/issues/3375092#comment-15153306 💬 Drupal 10.1 + Rejecting paths not conforming to standard URL's set by Drupal Postponed: needs info

🇺🇸United States jcontreras

I would have to guess this is a core issue not allowing urls without a starting "/" to be saved... I would have to track it down and maybe create a patch for core.

🇺🇸United States jcontreras

@micnap - did you try specifying "~2.1.0" for this module in the composer.json file? not the lock file.
(right before you run the command to upgrade to D10)
--- 2.1.0 is D10 specific. You can't install it in D9. and should only be installed in D10 ---

🇺🇸United States jcontreras

In other words, when you are ready to move forward with Drupal 10, update this module to 2.10-beta as well.

🇺🇸United States jcontreras

@lisotton - there are some major changes with php8 and Symphony on Drupal 10 and there are a lot of sites not ready to jump into Drupal 10 so I am making a distinction here to be able to support both D9 and D10 separately. Makes it easier to support older versions.

For Drupal 8 and 9 use version ~2.0.x
For Drupal 10 use version ~2.1.x

🇺🇸United States jcontreras

Actually. some of the issues I found had already been fixed on dev.2.x I will have to open another issue to add the new bugs I found in dev.

🇺🇸United States jcontreras

Hi @nagy.balint - you are right.. I actually will need to make a few more modifications to the patch. I will add it later today.

🇺🇸United States jcontreras

fixed issue:

Error messageWarning: Undefined variable $sample_image_uri in Drupal\image\Controller\ImageStyleDownloadController->deliver() (line 184 of core/modules/image/src/Controller/ImageStyleDownloadController.php).

Reroll for Drupal 9.5+ #21

🇺🇸United States jcontreras

Actually, this issue was an error from a patch applied.

https://www.drupal.org/project/drupal/issues/3127116#comment-15034043 🐛 Image styles - thumbnails are broken in config page when private file system is used RTBC

#12

🇺🇸United States jcontreras

Added to dev for now. I will push the release version soon. Thank you for your contribution!

Production build 0.71.5 2024