Strongarm often returns a variable that hasn't been defined, causing notices to appear for Drupal sites whose error reporting has a lower threshold.

CommentFileSizeAuthor
#2 strongarm_601742.patch631 bytesdrewish
strongarm_altered_notices.patch622 bytesAnonymous (not verified)

Comments

dmitrig01’s picture

Status: Needs review » Closed (won't fix)

1.x isn't supported apparenlty

drewish’s picture

Status: Closed (won't fix) » Needs review
StatusFileSize
new631 bytes

Seems silly not to apply this especially considering they still haven't got a final 2.x release out. I'd similarly came to this patch.

jmiccolis’s picture

drewish, yea we're not maintaining the 1.x code at all or advising anyone to use it. We came to the conclusion that the approach we took in that series wasn't the right one, and have abandoned it. The 2.x branch has an RC now, and should be going stable very soon.

Or is there something preventing you from moving to 2.x?

drewish’s picture

jmiccolis, well aside from the fact that there's no upgrade instructions? ;)

jmiccolis’s picture

ouch.

:)

Ok, off the top of my head:

  1. Save "strongarmed" variables to the database. (Go to the appropriate pages and hit "submit")
  2. Out with the old... in with the new... (upgrade that sucker!)
  3. If you're using features, and I'm sure you are, add declarations to your .info file like 'features[variable][] = "imageapi_jpeg_quality"' and run `drush features-update MY-MODULE`

fin.

PS let me know if this works for you and we should probably add something like this to the README.txt or similar.

PPS Strongarm 2.x works differently than Strongarm 1.x - it's less strong now. It won't override values that are in the database, just ones that module authors thought were good ideas.

drewish’s picture

Okay well that much was on the project page. But we're not using features, does it even make sense to use the module without?

jmiccolis’s picture

Not using features you say? Ctools does the lifting here, so you can still use strongarm. The hook is a bit more verbose now (the particulars of the format are handled via ctools), but pretty straight forward still. For example:


function atrium_strongarm() {
  $export = array();
  $strongarm = new stdClass;
  $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
  $strongarm->api_version = 1;
  $strongarm->name = 'user_pictures';
  $strongarm->value = TRUE;

  $export['user_pictures'] = $strongarm;
  return $export;
}

I know that ctools has a bulk exporter that could work here, but I haven't tested that with strongarm at all.

yhahn’s picture

Status: Needs review » Closed (won't fix)