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.
After upgrading to the latest version... I get the following errors after clicking on a node:
Parse error: syntax error, unexpected T_LNUMBER in /home/mysite/public_html/modules/nodewords/nodewords.module(812) : regexp code on line 1
Fatal error: preg_replace() [function.preg-replace]: Failed evaluating code: Studio 72 - Nocturnal in /home/mysite/public_html/modules/nodewords/nodewords.module on line 812
Comments
Comment #1
MasterSolution CreditAttribution: MasterSolution commentedI can confirm this issue. Started to happen after upgrade to 1.6 to nodes with custom views.
It doesn't happen on every node though, some of them just work fine.
Comment #2
As If CreditAttribution: As If commentedSimilar problem here, except I didn't upgrade. This is my first install:
632.jpg is a real file, and it appears normally in the View just preceding (including) this Node.
Again, most nodes are fine. Just this one freaky one so far.
Comment #3
Robrecht Jacques CreditAttribution: Robrecht Jacques commentedWhat PHP version do you use? You can see that on admin/logs/status.
Comment #4
As If CreditAttribution: As If commented4.3.9.
And here's some more info: I just managed to replicate this bug on a node that had previously been working fine.
I uploaded a picture to it via CCK imagefield. No problem. Then I deleted that picture and uploaded another one where the filename (preceding the .jpg) was a NUMBER, and it choked.
In every instance of failure, the filename is a number.jpg
Comment #5
As If CreditAttribution: As If commented[duplicate post removed]
Comment #6
Robrecht Jacques CreditAttribution: Robrecht Jacques commentedTry to replace:
with
around line 812 (in function
function _nodewords_check_content($text) {
) of nodewords.module.In the first line: replace "e" with "i" at the end.
Tell me if that worked.
Comment #7
As If CreditAttribution: As If commentedYES. You nailed it.
Comment #8
Robrecht Jacques CreditAttribution: Robrecht Jacques commentedYeah, stupid typo. Only tested it with non-number filenames.
When I get home later today I'll release a new version.
Comment #9
Devis CreditAttribution: Devis commentedWas having same problem after the upgrade, solved editing the pattern too, the "e" modifier makes preg_replace treat the replacement parameter as php code.
The error was present also with "alt" containing non-php valid chars like " " and "!", for example
<img src="xxx" alt="blank space" />
and
<img src="xxx" alt="exclamationmark!" />
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commented+1
Had this same issue happen to me on my upgrade and the solution in #6 fixed the problem.
Thanks,
txcrew
Comment #11
Robrecht Jacques CreditAttribution: Robrecht Jacques commentedFixed in 5.x-1.7.
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.