I just updated to Beta 2 and every time I save or create a node I get this:

* warning: array_filter() [function.array-filter]: The first argument should be an array in /~/sites/all/modules/boost/boost.module on line 727.
* warning: array_filter() [function.array-filter]: The first argument should be an array in /~/sites/all/modules/boost/boost.module on line 727.
(and yes, that is not a mistake, it pops up twice.)

Plus after updating the db tables with /updates.php I had got these errors:

* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /~/update.php on line 174.
* warning: Invalid argument supplied for foreach() in /~/update.php on line 338.

From what I see Boost is working and outputting static pages correctly. I just get warned every time I save or create content.

Comments

Coldice4678’s picture

I am heavily using imagefield on my site and after installing the new update beta 2. I can't save any nodes that have images checkmarked "Listed." Anytime I do checkmark an image, when saving I am sent to a blank page and the node is never updated.

Coldice4678’s picture

[removed]

mikeytown2’s picture

Assigned: Coldice4678 » Unassigned

Thanks for the bug reports!
#0: Try the latest dev. Fairly sure the array errors you posted are fixed in that (issue with array_filter() in boost_cache_expire()).

#1: Blank pages usually means php fatal error. Turn on display errors to get the error msg in your php.ini file.
http://php.net/errorfunc.configuration#ini.display-errors
Could also be related to #513924: Cache not expired if edit managed directly from content list

#2: Changed how stats module works with the latest dev.

mikeytown2’s picture

Status: Active » Postponed (maintainer needs more info)
Coldice4678’s picture

Thanks for the quick response.

I went ahead and installed the latest dev.
it fixed the edit page going blank but I still have the array filter issue but now on line 793.
I still have to try the stats module with the latest dev, if I notice anything else.

mikeytown2’s picture

Status: Postponed (maintainer needs more info) » Active

Thats an interesting error since glob() is supposed to always return an array().
Do you know how to patch? Try this patch first #513924: Cache not expired if edit managed directly from content list if you do. If you don't, let me know if you would prefer a module file or for me to show you where to change the lines of code. If that doesn't fix the issue, I have another idea on how fix the error.

mikeytown2’s picture

Title: Array issues » issue with array_filter() in boost_cache_expire()
Coldice4678’s picture

Title: issue with array_filter() in boost_cache_expire() » Array issues
Status: Active » Postponed (maintainer needs more info)

Reading the issues from http://drupal.org/node/513924 I think we are on the right foot but I am still having issues.

I patched boost.module (manually, simple subtracting what needs to be removed and adding what needs to be added)

before patching apparently I could only edit the posts via the admin/content page and not directly from the node.

after the patch, I get a blank page stopping me from successfully editing using either paths of editing (directly or by the content page).

I am guessing now that the boost_cache_expire() is firing up but it is causing some interfere when editing a node (intial Saving is ok).

(Note: I am using a content type with many cck fields)

mikeytown2’s picture

If you are getting a blank page (called the White screen of Death) that means there is an error in the PHP, out of memory, ect... Turn on display errors! Odds are you messed something up when you patched it by hand.

Also try replacing this

  // Get list of related files
  $tempA = glob(boost_file_path($path, FALSE, NULL) . (($wildcard) ? '*' : '') . BOOST_FILE_EXTENSION, GLOB_NOSORT);
  $tempB = glob(boost_file_path($path, FALSE, NULL) . (($wildcard) ? '*' : '') . BOOST_XML_EXTENSION, GLOB_NOSORT);
  $filenames = array_filter($tempA + $tempB);
  if (empty($filenames)) {
    return FALSE;
  }

With this

  // Get list of related files
  $tempA = glob(boost_file_path($path, FALSE, NULL) . (($wildcard) ? '*' : '') . BOOST_FILE_EXTENSION, GLOB_NOSORT);
  $tempB = glob(boost_file_path($path, FALSE, NULL) . (($wildcard) ? '*' : '') . BOOST_XML_EXTENSION, GLOB_NOSORT);
  if (!empty($tempA) && !empty($tempB)) {
    $filenames = array_filter(array_merge($tempA, $tempB));
  }
  elseif (!empty($tempA)) {
    $filenames = $tempA;
  }
  elseif (!empty($tempB)) {
    $filenames = $tempB;
  }
  else {
    return FALSE;
  }
  if (empty($filenames)) {
    return FALSE;
  }
Coldice4678’s picture

Yeah, No Errors, It looking good thank you.
(note:with just applying the code in #9, It worked without the patch in #6, but by the end I fully patched the boost.module)

This is probably for another thread but after updating to the latest dev now anonymous Stats counter doesn't work anymore. and yes I did replace the the boost_stat.php in the root dir, plus I changed the code for the .htacess

Thanks again,
-JR

mikeytown2’s picture

@coldice4678
did you place the NEW stats block?

mikeytown2’s picture

Status: Postponed (maintainer needs more info) » Fixed
mikeytown2’s picture

Status: Fixed » Reviewed & tested by the community
Coldice4678’s picture

@mikeytown2 thanks it all works now. Much love on maintaining this module. I guess we can closed this issue. thanks again.

mikeytown2’s picture

Status: Reviewed & tested by the community » Fixed

committed

Status: Fixed » Closed (fixed)

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