I would love to use the sampler_api - on a Drupal 7 site.
Any suggestions on a path to follow to do the upgrade ? (I will keep poking around, but having not looked through this before, there is a lot to get my head around.)

Yeah, I know Ctools is not stable yet, but are the elements of ctools that sampler requires in any kind of fit state ?

Thanks for any info.

Peter

Comments

hunmonk’s picture

i think a lot of the API will not need to be adjusted. pretty sure the big area that will need attention is the database handlers.

sampler api only uses the ctools plugin architecture -- no idea if that's ready or not yet.

greggles’s picture

Title: Upgrading to 7 » Upgrading Sampler API to Drupal 7
Category: support » task

Subscribing and fixing some metadata.

elc’s picture

StatusFileSize
new46.7 KB

I had a project that needed this in D7, but it has since been postponed and my focus has been directed elsewhere. I didn't get far, but this now slots itself into D7, but should in no way be considered a complete port. It was mostly just following Coder, and then changing the SQL where it had conditional changes on the SQL, and where methods no longer existed.

I don't think it actually works properly yet :P There's a whole DB abstraction layer in there that could probably be eliminated in favour of just using DB:TNG unless I'm way off the mark.

Anyway, hope this is a step in the right direction for someone. The patch from a branch off at 8cc7aa4e1233a5120d58269a65dc609bf6e55078.

hunmonk’s picture

StatusFileSize
new3.4 KB

apologies for the long radio silence. had time to review this today, it's a great start. the attached interdiff shows the few minor changes i made to your initial patch:

  • the edits you made regarding sampler_load_sampler() didn't make sense to me, so i've restored that work to its original state.
  • no need for hook_install() in sampler anymore, so tore that out completely.
  • this is incorrect:
    -      // This call is not conditional on the taxonomy module existing but
    -      // trackObjectIDs() function call is? Error? @error
    

    As there is actually a check for taxonomy module in that function.

  • restored the uninstall hook for the example module, it's useful for testing.

i've created a 7.x-1.x branch and release node, and pushed the changes there, so we are underway!

hoping to make good progress in the next day or two.

hunmonk’s picture

ok, the 7.x conversion is now mostly done. still need to test everything.

i also looked at the idea of tossing the storage plugins in favor of the new storage API, but i don't think that's really feasible, as the storage plugins do more than just abstract the database engine away.

will try to knock out most of the testing tomorrow.

hunmonk’s picture

the upgrade is basically complete. i've tested all of the drush functionality, storage with all of the various storage plugins, the menu callbacks that perform sampling, and all of the metric plugins appear to be working.

the only thing that hasn't been looked at is the views integration, which i'm not very familiar with, and could use some support on.

leaving the issue open until that's addressed.

jhodgdon’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

Found one minor issue with the views integration:
#1706716: PHP warning after D7 cache clear

hunmonk’s picture

Status: Active » Fixed

had a chance to test the views integration on a 7.x site today, and it seems to work perfectly. so, i consider the initial 7.x port done, and have created a 7.x-1.0 release.

Status: Fixed » Closed (fixed)

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