I was getting this error in my php watchdog logs

preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Unknown modifier '9' in /home/mysite/public_html/mysite/sites/mysite.com/modules/adsense/adsense.module on line 742.

I realized it must have been because I had <front> in the visibility block with "Show on every page except the listed pages." checked. I think this has solved the problem but this means this feature is not working properly. (However, I think you could still disable ads on your front page by editing each specific ad block)

Comments

kbahey’s picture

Status: Active » Postponed (maintainer needs more info)

For debugging, can you add the following line just before line 742?

print "regexp=|$regexp| path=|$path|";

Then log off, and visit the page that gives you the error, and tell me what the results are.

yktdan’s picture

I have similar problem but it is not only on front page. I get it on all pages and independent of the region I put it in.

I put in the above debugging line and did not see any output anywhere.

This is so I get notified.

sven h’s picture

I get a simmilar warning on all pages, as does every user:

warning: preg_match() [function.preg-match]: Unknown modifier '1' in /local/web/websites/6100823161/www/web/modules/adsense/adsense.module on line 1246.

I did get adsense to show ads but so far only non commercial ones. (I just started)

stevenghines’s picture

Version: 5.x-1.6 » 5.x-2.1

I get exactly the same problem with 5.x-2.1; if I set "Show on every page except the listed pages" to on the AdSense configuration page at /admin/settings/adsense then I get the same error message talking about an 'Unknown Modifier' and an integer that matches the ID of the node I am using as .

I too am having to rely on the "Show on every page except the listed pages" in the adsense block that is generated to keep the AdSense code off the home page.

jcnventura’s picture

Version: 5.x-2.1 » 5.x-3.x-dev
Status: Postponed (maintainer needs more info) » Fixed

This has been fixed in the newer version.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.