wanted to try a simple d6-d7 upgrade today. still not sure it's working, but was an easy one to start with and work though most of the kinks.

CommentFileSizeAuthor
d7_upgrade.patch6.94 KBmgifford

Comments

sillygwailo’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev
Status: Active » Fixed

Looks closer to the 1.x branch in terms of feature set (though it appears you used the 2.x branch as the basic for the patch). I've pushed a 7.x-1.x branch, so let's close this issue and create separate issues for 7.x related issues.

mgifford’s picture

Issue tags: +D7 porting

Sounds good to me. Please ping me when there's a release to test. It is a pretty straight forward module to play with a Git upgrade. I wonder if I just missed the 2.x branch or if it isn't in the Git repository. Certainly something to look for in the future though.

Would be interesting to see examples of where/how this is being used too.

sillygwailo’s picture

A 7.x-1-x dev snapshot is now available.

mgifford’s picture

I got this error:

PDOException: SQLSTATE[HY000]: General error: 1364 Field 'bid' doesn't have a default value: INSERT INTO {wwsgd_visits} (visits, sid) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => 5 ) in wwsgd_set_visits() (line 41 of /DRUPAL/sites/all/modules/contrib/wwsgd/wwsgd.module).

I am pretty sure I ran into that issue too and got that resolved in the patch I submitted. Useful to compare to see if anything else (like coder suggestions) could be modified.

sillygwailo’s picture

The bid column is probably a holdover in your database from the 2.x branch of the module for Drupal 6. The 1.x branch doesn't have a bid column (at least not in the code). I just pushed a 2.x branch for the Drupal 7 version of the module which goes with a different approach. That is, instead of adding a single block through code, all blocks have visit expiry attached to them in the block's visibility configuration. A dev snapshot will be available shortly.

mgifford’s picture

I pulled it from git and got a different fatal error.


PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'a11yyow.wwsgd_blocks' doesn't exist: SELECT wwsgd_blocks.max_visits AS max_visits FROM {wwsgd_blocks} wwsgd_blocks WHERE (bid = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 163 ) in wwsgd_get_max_visits() (line 51 of /DRUPAL/sites/all/modules/wwsgd/wwsgd.module

I can wait to try again when there is another release though. Just seemed like a neat idea to add onto a refreshed D7 site.

sillygwailo’s picture

I've pushed a fix to the schema for that, so a fresh install (or if you drop the tables and remove the entry for the module in the system table). Maybe that exposes the need for an uninstall hook.

mgifford’s picture

I'll look at the db and see about nixing the tables next time I try it. There's really no need for an upgrade path for me, but I keep running into issues with the install.

dgastudio’s picture

run update.php in drupal 7:

PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'sid' at row 1: INSERT INTO {wwsgd_visits} (visits, sid) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => ) in wwsgd_set_visits() (line 41 of /home/*******/domains/u3220.rapid.vps-private.net/sites/all/modules/wwsgd/wwsgd.module).

Status: Fixed » Closed (fixed)

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

bluecobalt’s picture

Status: Closed (fixed) » Needs work

Neither of the D7 versions of this module seem to work. I've been trying to troubleshoot them, but not 100% successful. Did anyone get the bugs worked out and get a D7 version working?

gaele’s picture

Status: Needs work » Closed (fixed)