Clients module has had two major changes:

- client connections are referred to by machine name, not database ID
- client connection method calls throw exceptions

This module needs updating for those changes.

Comments

joachim’s picture

Status: Active » Fixed
StatusFileSize
new5.93 KB
joachim’s picture

I missed one -- made followup commit.

Status: Fixed » Closed (fixed)

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

smoothify’s picture

Status: Closed (fixed) » Active
StatusFileSize
new5.36 KB

When testing out this module, i noticed the user import needs to be updated too.

Here is a patch that attempts this based on your node import changes.

smoothify’s picture

Status: Active » Needs review
joachim’s picture

Status: Needs review » Needs work

Looks good apart from one problem:

Users don't have any notion of 'last edited' because user table doesn't have an 'updated' column like nodes do, so the $user_retrieve_filter won't do anything.

+++ b/types/uprpc_import_user/uprpc_import_user.batch.inc
@@ -29,8 +29,28 @@ function _giuser_batch_users(&$context) {
+    // Get the setting for what to retrieve: everything, only new nodes, or new and updated nodes.
+    $user_retrieve_filter = variable_get('uprpc_remote_filter', 'new');
...
+      $max = $drupal_client->callMethod('query.count_unimported', 'users', 'uid', $joins, 'uid > 1', $user_retrieve_filter);

@@ -38,33 +58,88 @@ function _giuser_batch_users(&$context) {
+      $list = $drupal_client->callMethod('query.get_import_list', 'users', 'uid', 0, $joins, 'uid > 1', $user_retrieve_filter);

vbv

smoothify’s picture

Status: Needs work » Needs review

Hmm, i hadn't thought about that.

Currently this allows you to pick up new users since the last change but of course wouldn't take into account any changes to existing users.

It would be *really* useful to be able to track which users have been modified since the last import as well. On the site i'm doing there is over 11,000 users so it takes a bit of time to import - some people may edit there settings in that time.

Perhaps a module on the D5 side of things could respond to after_update in hook_user and keep track of the timestamps of any changes? Then that could be used in the same way as in the node import.

smoothify’s picture

Status: Needs review » Needs work
StatusFileSize
new5.36 KB

Here is another patch, this contains the original changes, plus inside the uprpc_import_services.module it now adds a 'changed' field and sets the value of this during the update op of hook_user.

smoothify’s picture

Doh! Would help if I uploaded the correct patch...

smoothify’s picture

Status: Needs work » Needs review
StatusFileSize
new8.94 KB

Double Doh, That last patch didn't include the relevant install file inside the patch.

Apologies, I hope this is third time lucky :)

joachim’s picture

Status: Needs review » Fixed

I'm always iffy about changing other modules' tables, but a site that's running this is in theory about to be taken down after the migration is complete anyway :)

Committed with some comment tweaks.

- #1245342 by smoothify: Changed user imports for latest changes to Clients module; added 'changed' column to users table to allow incremental imports of users.

Status: Fixed » Closed (fixed)

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