I'm recently seeing this error on a client's website:

Notice: Undefined property: stdClass::$data in advagg_install_check_via_http() (line 1523 of /home/mywebsite/public_html/sites/all/modules/advagg/advagg.install).

I'm also seeing the following notice in the Status report:

Adv CSS/JS Agg - HTTP Request HTTP requests to advagg for js files are not getting through. The .htaccess needs to be rebuilt.

Rebuilding the .htaccess has no effect. Any suggestions?

Thanks!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bisonbleu created an issue. See original summary.

numerabilis’s picture

I have the same problem, please help us!

Rafal Lukawiecki’s picture

Status: Active » Needs review

See patch #4 for #3190602: Undefined property: stdClass::$error which may fix this issue. Make sure to use the current dev branch when applying it.

Rafal Lukawiecki’s picture

PS. Regarding @bisonbleu comment about "rebuilding .htaccess" not working, I can concur this is a separate issue. The check in advagg.install is looking for presence of ErrorDocument 404 /index.php preceded by a newline (e.g. an empty line followed by that line) in the advagg .htaccess. The rebuild option in advagg operations fails to write that line. If you add it manually, you should get a different status error or warning, most likely related to loopback issues.

mikeytown2’s picture

Status: Needs review » Active

So the advagg_htaccess_check_generate() function needs to have this?

  if ($GLOBALS['base_path'] !== '/') {
    $data .= "\nErrorDocument 404 {$GLOBALS['base_path']}index.php\n";
  }
Rafal Lukawiecki’s picture

Nice to see you back on the project, @mikeytown2. As for your suggestion, it makes sense. I won't be able to test it for a few weeks though, but happy to do that when I can. My work on our Drupal sites comes and goes in bouts of time.

mikeytown2’s picture

Title: Undefined property: stdClass::$data in advagg_install_check_via_http() » ErrorDocument 404 regex failure in advagg_install_check_via_http()
Version: 7.x-2.34 » 7.x-2.x-dev
Status: Active » Needs review
FileSize
1.69 KB

Looking at

$found = preg_match_all('/\\n\s*ErrorDocument\s*404\s*(.*)/i', $htaccess, $matches);

and making sure there's a new line and space should take care of the regex matching.

  • mikeytown2 committed be00b22 on 7.x-2.x
    Issue #3144524 by mikeytown2: ErrorDocument 404 regex failure in...
mikeytown2’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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