Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
- I create a new block with some HTML in it.
- I configure the block, setting Visibility to "Show on only the listed pages." and list just "<front>
".
- I save and get the following warning:
warning: preg_match() [function.preg-match]: Unknown modifier '3' in /home/www/site/modules/block.module on line 474.
The block does not show up on the front page.
Comment | File | Size | Author |
---|---|---|---|
#3 | block_3.patch | 850 bytes | Thiago Bastos |
Comments
Comment #1
Thiago Bastos CreditAttribution: Thiago Bastos commentedHere's a patch. preg_quote(variable_get('site_frontpage', 'node'), '/') did the trick:
Comment #2
Dries CreditAttribution: Dries commentedCan you upload your patch?
Comment #3
Thiago Bastos CreditAttribution: Thiago Bastos commentedSorry, here's the attachment.
I wasn't fully aware of the procedures. I'm reading the contributor's guide now...
Did I get everything right this time?
Comment #4
drummCode looks good. I can see how this might be a problem. +1
(I didn't try running with this patch)
Comment #5
fmann CreditAttribution: fmann commentedI applied the patch and it fixed the problem for me. Thank you much!
This is the first bug I've submitted here and I want to make sure the fix gets merged in.
Should I change the status of this post to fixed?
Comment #6
ezheidtmann CreditAttribution: ezheidtmann commentedFloydM: The status is changed to fixed only when/if the patch is applied.
Comment #7
fmann CreditAttribution: fmann commentedGood deal. Thank you, clydefrog (and thank you HellRaider for the patch).
Comment #8
Stefan Nagtegaal CreditAttribution: Stefan Nagtegaal commentedI can confirm that this patch works as it should, had the same errors FloydM when trying to put a block on the frontpage of my site..
Good catch HellRaider! :-)
Comment #9
Dries CreditAttribution: Dries commentedHellRaiser, thanks for attaching the patch. You got it right. :) Committed to HEAD and DRUPAL-4-6. Thanks.
Comment #10
Dries CreditAttribution: Dries commentedComment #11
(not verified) CreditAttribution: commentedComment #12
(not verified) CreditAttribution: commentedComment #13
ax CreditAttribution: ax commentedComment #14
(not verified) CreditAttribution: commentedComment #15
(not verified) CreditAttribution: commentedComment #16
(not verified) CreditAttribution: commented