We have been using a heavily patch git checkout of the workbench moderation module a few commits over 7.x-1.3 for more then 2 years now. It has now been at 7.x-1.4 for around a year with just two revert commits in dev. This module has more then a few times caused issues with other module workflows but it looks like every patch we had has made its way into workbench moderation itself:

Current Makefile

projects[workbench_moderation][version] = 1.x-dev
projects[workbench_moderation][subdir] = contrib
projects[workbench_moderation][type] = module
projects[workbench_moderation][download][type] = git
projects[workbench_moderation][download][revision] = a90378d
projects[workbench_moderation][download][branch] = 7.x-1.x
; Trivial
projects[workbench_moderation][patch][1237558] = http://drupal.org/files/double-messages-1237558-7.patch
projects[workbench_moderation][patch][1732802] = http://drupal.org/files/workbench-moderation-draft-terminology-1732802-1.patch
projects[workbench_moderation][patch][1785798] = http://drupal.org/files/workbench_moderation-revision-moderation-edit-link-1785798-14.patch
projects[workbench_moderation][patch][1787214] = http://drupal.org/files/workbench_moderation-vbo-revision-1787214-13.patch
projects[workbench_moderation][patch][1836680] = http://drupal.org/files/workbench-moderation-solr-index-1836680-1.patch
projects[workbench_moderation][patch][1919706] = http://drupal.org/files/issues/workbench_moderation-entitymalformed-1919706-3.patch
; Extensively Tested
projects[workbench_moderation][patch][1260112] = http://drupal.org/files/workbench_moderation_is_current-1260112-58.patch
projects[workbench_moderation][patch][1330562] = http://drupal.org/files/workbench_moderation-entity-cache-1330562-22.patch
projects[workbench_moderation][patch][1946392] = http://drupal.org/files/et_language-1946392-1.patch
; Stable
projects[workbench_moderation][patch][1279290] = http://drupal.org/files/workbench_moderation-delete-current-unpublished-revision-1279290-16.patch
projects[workbench_moderation][patch][1402860] = http://drupal.org/files/issues/workbench_moderation-panelizer_revisions-1402860-39.patch
projects[workbench_moderation][patch][1408858] = http://drupal.org/files/default-moderation-state-1408858-12.patch
projects[workbench_moderation][patch][1436260] = http://drupal.org/files/issues/1436260-workbench_moderation-states-node_save-999.patch
projects[workbench_moderation][patch][2098151] = http://drupal.org/files/playnicewithpanels-2098151-01.patch
projects[workbench_moderation][patch][2070389] = http://drupal.org/files/workbench_moderation-correctly_update_status-2070389-2.patch
projects[workbench_moderation][patch][2099151] = http://drupal.org/files/workbench_moderation-better_migration_support-1445824-11.patch

Current Makefile -> Workbench Moderation 1.4

Patches that were committed:

;Trivial
projects[workbench_moderation][patch][1237558] = http://drupal.org/files/double-messages-1237558-7.patch
projects[workbench_moderation][patch][1732802] = http://drupal.org/files/workbench-moderation-draft-terminology-1732802-1.patch
projects[workbench_moderation][patch][1785798] = http://drupal.org/files/workbench_moderation-revision-moderation-edit-link-1785798-14.patch
projects[workbench_moderation][patch][1787214] = http://drupal.org/files/workbench_moderation-vbo-revision-1787214-13.patch
projects[workbench_moderation][patch][1919706] = http://drupal.org/files/issues/workbench_moderation-entitymalformed-1919706-3.patch
;Extensively Tested
projects[workbench_moderation][patch][1260112] = http://drupal.org/files/workbench_moderation_is_current-1260112-58.patch
projects[workbench_moderation][patch][1946392] = http://drupal.org/files/et_language-1946392-1.patch
;Stable
projects[workbench_moderation][patch][1279290] = http://drupal.org/files/workbench_moderation-delete-current-unpublished-revision-1279290-16.patch
projects[workbench_moderation][patch][1436260] = http://drupal.org/files/issues/1436260-workbench_moderation-states-node_save-999.patch
projects[workbench_moderation][patch][2070389] = http://drupal.org/files/workbench_moderation-correctly_update_status-2070389-2.patch

Patches that were updated:

;projects[workbench_moderation][patch][1402860] = http://drupal.org/files/issues/workbench_moderation-panelizer_revisions-1402860-39.patch

Patches that were not needed anymore:

projects[workbench_moderation][patch][1836680] = http://drupal.org/files/workbench-moderation-solr-index-1836680-1.patch
Removed since original post: http://drupal.org/files/default-moderation-state-1408858-12.patch (later patch in this issue was committed)
Removed since original post: http://drupal.org/files/workbench_moderation-entity-cache-1330562-22.patch (later patch in this issue was committed)
Removed since original post: https://www.drupal.org/files/issues/workbench_moderation-n1402860-73.patch (patch moved to panels in later)

Proposed Makefile

projects[workbench_moderation][version] = 1.4
projects[workbench_moderation][subdir] = contrib
projects[workbench_moderation][patch][2098151] = http://drupal.org/files/playnicewithpanels-2098151-01.patch
projects[workbench_moderation][patch][2099151] = http://drupal.org/files/workbench_moderation-better_migration_support-1445824-11.patch
projects[workbench_moderation][patch][2308095] = http://drupal.org/files/issues/workbench_moderation-pathauto_alias_issue-2308095-20.patch
projects[workbench_moderation][patch][2308096] = http://drupal.org/files/issues/view_all_unpublished-1492118-78.patch
projects[workbench_moderation][patch][2308097] = http://drupal.org/files/issues/workbench_moderation-optimize_node_revision_history-1408838-67.patch

Important: All but the panels patch have been added and were committed in workbench_moderation 7.x-1.x-dev after the 7.x-1.4 release. 2 of these are reverts of potentially damaging functionality in 7.x-1.4 itself and 1 other fix issues related to pathauto aliases.

Schema Changes

So this brings us back in line to using a stable official release which is always the preferred option. There is however one added wrinkle. A patch we were early adopters and helped resolve in workbench_moderation against postgresql:

http://drupal.org/files/workbench_moderation_is_current-1260112-58.patch

Was using the hook_update_7009 namespace but in workbench moderation was committed later then another issue which incidentally was using that hook_update_n, so this patch hook_update_n was added instead to hook_update_7010. This is easily resolved by adding the missing hook_update_n logic to wetkit_core:

/**
 * Updates to WorkBench Moderation and schema alignment with v1.4.
 */
function wetkit_core_update_7406() {
  $fields = array(
    'id' => array(
      'type' => 'serial',
      'not null' => TRUE,
      'unsigned' => TRUE,
      'description' => 'Primary Key: Unique workbench_moderation transition identifier.',
    ),
    'name' => array(
      'description' => 'The machine-readable name of this workbench_moderation transition.',
      'type' => 'varchar',
      'length' => 255,
      'initial' => 'from_name',
    ),
  );
  // Add index too.
  $index = array(
    'primary key' => array('id'),
  );

  db_add_field('workbench_moderation_transitions', 'id', $fields['id'], $index);
  db_add_field('workbench_moderation_transitions', 'name', $fields['name']);

  // Fill in the blanks.
  db_update('workbench_moderation_transitions')
    ->expression('name', "CONCAT(from_name, '-', to_name)")
    ->execute();
}

And then since the install profile itself since runs before all other dependencies sets workbench_moderation to an appropriate schema state of 7010. Fixing all issues with the update.

/**
 * Workbench Moderation schema correction.
 */
function wetkit_update_7100() {
    drupal_set_installed_schema_version('workbench_moderation', '7010');
}

Tests

The following manual tests to confirm existing functionality have been done, against node + moderation states, and nodes in a deploy based scenario. Will let this be tested for a few weeks but looks good on existing test.

Comments

sylus created an issue. See original summary.

sylus’s picture

Attaching patch for wetkit_core.make, updating workbench moderation schema will be done by install profile wetkit.install.

sylus’s picture

Issue summary: View changes
joseph.olstad’s picture

I just looked at the related commit for wetkit_core

just something to ponder

wetkit_core_update_7406 looks to me like something that should run to update a previously installed setup? but maybe not on a fresh vanilla install? (however I haven't exactly looked at the .install file for workbench_moderation with all the patches applied, I know that the problem with version 1.4 didn't occur on fresh installs, it was upgrading that was the problem from what I recall)?

There was a related ticket upstream

sylus’s picture

Yes this is only supposed to be an upgrade issue, fresh installs won't have this problem because we no longer have the patch to workbench_moderation that renamed current to is_current since is committed now. That patch we used since we adopted it early (postgresql) leveraged hook_update_7009 but was committed as hook_update_7010 since another ran got it. This will only affect sites upgrading.

sylus’s picture

Behat tests were extending against Workbench Moderation and all pass. Additionally some longstanding issues addressed:

1) Being able to revert to a published version (if it is published why revert?)
2) Moderation Tab database lookup queries have been optimized
3) Edge cases with other modules
4) All transition labels are now translatable. (patch we are using after 1.4 release)

sylus’s picture

Actually one behat test didn't pass the migration of nodes under workbench moderation for some reason are only showing in french. Might be a change needed to how I wrote the migration install scripts or a bug on workbench' part.

sylus’s picture

Found the problem one of our "newer" patches that has actually made it into dev branch of workbench moderation:

projects[workbench_moderation][patch][2285931] = http://drupal.org/files/issues/wm-field_translations-2285931-1.patch

It seems they force unset field translations to fix issues with draft publishing. We will have to report this to them as it also prevents migration done with migrate module.

joseph.olstad’s picture

ok, regarding comment#8, have you reported this upstream to workbench_moderation? Hopefully they fix this before publishing another release.

sylus’s picture

I've expanded the test suite for workbench_moderation with behat by about 3x, now testing translations and all states of workbench_moderation.

colan’s picture

If you want to be really progressive, you folks could add the patch from #2376839: Rewrite to use the new Drafty module to help with testing! :)

We really need to get that one in there as it solves a lot of problems.

sylus’s picture

I think right now the goal is to just get feature parity to where we were before. Especially since the 1.4 release has been out for a while. The drafty module would be best looked at as a separate issue as looks like a big change. Once get workbench in and everything solid can then definitely take a look. There has been alot of testing with workbench moderation with tools like metatag + deploy so drafty would have to accomplish those as well. Will keep an eye on progress and do some tests if find time ^_^

sylus’s picture

Issue summary: View changes
sylus’s picture

Issue summary: View changes
sylus’s picture

Issue summary: View changes
sylus’s picture

Issue summary: View changes
sylus’s picture

Issue summary: View changes
sylus’s picture

sylus’s picture

Issue summary: View changes
sylus’s picture

Status: Active » Fixed

This is all in now and looks good from my testing and the ones written for behat. If there are any other scenarios missed kindly add some to our existing tests :)

There will probably still be edge cases but I did due diligence on what patches we need on top of 7.x-1.4 mostly related to pathauto.

Will let this cool for a week in order to get people to review before doing a release. ^_^

  • sylus committed 1d8e887 on 7.x-4.x
    Fixed WetKit Core for Issue #2633456: Workbench Moderation bring back to...
  • sylus committed 21fa3c8 on 7.x-4.x
    Fixed WetKit Core for Issue #2633456: Workbench Moderation bring back to...
  • sylus committed 33179df on 7.x-4.x
    Fixed WetKit Core for Issue #2633456: Workbench Moderation bring back to...
  • sylus committed 5cc787f on 7.x-4.x
    Fixed WetKit Core for Issue #2633456: Workbench Moderation bring back to...
  • sylus committed 9641160 on 7.x-4.x
    Fixed WetKit Test for Issue #2633456 by sylus: Workbench Moderation...
  • sylus committed b8354cd on 7.x-4.x
    Merge branch '7.x-4.x' of https://github.com/sylus/wet-boew-drupal into...
  • sylus committed bac7c98 on 7.x-4.x
    Fixed WetKit Core for Issue #2633456: Workbench Moderation bring back to...
  • sylus committed f61a48f on 7.x-4.x
    Fixed WetKit Core for Issue #2633456: Workbench Moderation bring back to...
joseph.olstad’s picture

Probably nothing to be concerned about however FYI:

drush updb
 Workbench_moderation  7010  Comply with SQL-99:  Rename the 'current' column to 'is_current'.
 Wetkit_core           7406  Updates to WorkBench Moderation and schema alignment with v1.4.
 Wetkit                7100  Workbench Moderation schema correction.
Do you wish to run all pending updates? (y/n): y
Performed update: wetkit_update_7100                                                                                                                                                     [ok]
Performed update: wetkit_core_update_7406                                                                                                                                                [ok]
Cannot change the definition of field <em class="placeholder">workbench_moderation_node_history</em>.<em class="placeholder">current</em>: field doesn't exist.                          [error]
Performed update: workbench_moderation_update_7010 
joseph.olstad’s picture

updb from nov 26 dev (approximately)

sylus’s picture

Yeah the wetkit one should have prevented the workbench one from running but because they are all in same step likely doesn't you can ignore the error because the patched we used already did the change hence why complaining. I'll try to get distro install hook to be more forceful.

Status: Fixed » Closed (fixed)

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

sylus’s picture

sylus’s picture

jamesrward’s picture

Any chance of a backport to 1.x for this? We desperately need to get the node history improvements. I'm willing to take a stab at a PR if there is a chance it will be accepted.

joseph.olstad’s picture

Category: Bug report » Support request
Status: Closed (fixed) » Active

To propose a patch, git clone the wetkit_core project , then checkout the 1.x branch, edit the wetkit_core.install file accordingly (see notes below about grabbing the wetkit_core_update_7406 and pasting it into the 1.x wetkit_core.make file renamed as wetkit_core_update_7107 ,

Take wetkit_core_update_7406() from the current 4.x dev branch of wetkit_core wetkit_core.install

function wetkit_core_update_7406() {
  /* GRAB ALL THE CODE FROM update_7406 */
  //.... code to copy
}

paste this code into the latest copy of wetkit_core 1.x dev branch wetkit_core.install

rename function wetkit_core_update_7406 as function wetkit_core_update_7107

ALSO, you'll have to edit the wetkit_core.make file for 1.x branch with the workbench_moderation section from 4.x, save the updated wetkit_core.make file, once you're done:
#generate a patch as follows:
sudo git diff > help_us_help_you_workb_upgrade_wk_core1x_2633456-99.patch

upload the patch help_us_help_you_workb_upgrade_wk_core1x_2633456-99.patch to this issue, and change the issue status to "needs review", then the maintainer will have a look at it and he'll probably add it for you and create a new release for you.

Details about the wetkit_core.make changes needed for 1.x:

update the 1.x wetkit_core.make for workbench moderation with the following build information

projects[workbench_moderation][version] = 1.4
projects[workbench_moderation][subdir] = contrib
projects[workbench_moderation][patch][2098151] = http://drupal.org/files/playnicewithpanels-2098151-01.patch
projects[workbench_moderation][patch][2099151] = http://drupal.org/files/workbench_moderation-better_migration_support-1445824-11.patch
projects[workbench_moderation][patch][2308095] = http://drupal.org/files/issues/workbench_moderation-pathauto_alias_issue-2308095-20.patch
projects[workbench_moderation][patch][2308096] = http://drupal.org/files/issues/view_all_unpublished-1492118-78.patch
projects[workbench_moderation][patch][2308097] = http://drupal.org/files/issues/workbench_moderation-optimize_node_revision_history-1408838-67.patch
projects[workbench_moderation][patch][2428371] = http://drupal.org/files/issues/upgrade_from_1_3_to_1_4-2428371-42.patch
projects[workbench_moderation][patch][2633456] = http://drupal.org/files/issues/workbench_moderation-2633456-26.patch
projects[workbench_moderation][patch][2662600] = http://drupal.org/files/issues/workbench_moderation-2662600-3.patch

Don't forget that you'll have to also edit the wetkit_core.install file as mentioned above.

If you want to test this yourself, you'll also have to download workbench moderation release 1.4
and then apply all of the above patches in sequential order , place it in profiles/wetkit_modules/contrib , suggest using the "patch" program

you can test the patches before applying them as follows:
cd profiles/wetkit/modules/contrib/workbench_moderation
rm -rf workbench_moderation #(delete the old version)
sudo wget https://ftp.drupal.org/files/projects/workbench_moderation-7.x-1.4.tar.gz
sudo tar -pxzf workbench_moderation-7.x-1.4.tar.gz
sudo wget https://www.drupal.org/files/playnicewithpanels-2098151-01.patch
patch -p1 --dry-run < playnicewithpanels-2098151-01.patch

then as expected there should not be any errors
to actually apply the patch:
sudo patch -p1 < playnicewithpanels-2098151-01.patch

, this is the instructions for linux type systems, if you're on windows you can download the patch.exe program and use it the same way, minus the sudo command. (sudo to 'super user' filesystem permissions, just in case you have to)

repeat the patch procedure for all of the above patches until all of them are applied.

Back up your database
Then run drush updb

You'll see a bunch of update messages for workbench_moderation

Restore to backup if there are any update failures.

OR, hope that the maintainer will put out a 1.x release with an updated 1.x wetkit_core.make file and an updated wetkit_core.install , then download the updated build.

Good luck.

joseph.olstad’s picture

jamesrward , if you want to help us help you, please follow my instructions. If you have any questions, let me know, I can help you fill in the blanks.

jamesrward’s picture

I'll put a patch together and submit it here. Also happy to create a separate issue for this if that will keep things a bit better organized. I just wanted to be sure there was a chance a patch would be accepted before I started working on it.

jamesrward’s picture

Here's the backport patch. Working through some tests now.

joseph.olstad’s picture

The challenge is to do this in a way that will not break your upgrade path to 4.x , so in order for this to be accepted into the 1.x branch you'll have to modify the wetkit_core.install 4.x update_7406 so that it checks your workbench_moderation schema to make sure that you've not already upgraded , because you won't want to run the update_7406 if you've already ran update_7107 ,

some new logic checks in update_7406 will be necessary and will have to be committed at the same time in order to not break the upgrade path for those upgrading from your potential 7.x-1.14 release to the 7.x-4.6 release (future release , in theory)

jamesrward’s picture

Coming from wetkit 1.13 we need to swap the last two workbench_moderation_update_n functions or the update "Add new fields to workbench_moderation_transitions table." will silently fail to run. Not an issue on clean installs but necessary for updates.

sylus’s picture

I can take a look at this when it is done and possibly backport. My only concern is that there aren't any Behat tests in the 1.x line for workbench moderation. There are only a few simple tests and confirmation that the make and drush site install works. So a fair bit of testing would have to be done to make sure there aren't any regressions as I won't be backporting the Behat work. Please take time with the patch and assign to me once is ready to be merged. ^_^ Thanks a bunch!

jamesrward’s picture

Given the status of wetkit 1.x and the work involved I think we are better off moving this up to contrib to get these fixes in production. Thanks for all the assistance and feel free to mark as closed unless someone else wants to run with the backport.

joseph.olstad’s picture

just fyi jamesrward , without changing the 4.x code and if you upgrade workbench_moderation THEN upgrade to wetkit distro 4.x the update hook wetkit_core_update_7406 will fail because it assumes that you have the default version of workbench_moderation that is currently included in the 1.x distro

To make the 4.x branch more robust in this case:
it would be advisable even if this patch doesn't go forward to add a check in wetkit_core_update_7406 as follows:

if ( /* pseudo code */ workbench_moderation schema version is <= '7010' ) { 
//continue executing code block in 7406 
} else {
//do nothing because workbench_moderation was already upgraded
}

probably a good idea for us to update the 4.x branch anyway (wetkit_core.install 4.x ) .

The other patch that you proposed I believe is one I had proposed upstream in the workbench_moderation queue, if my memory serves me without looking, I believe that I had tested it to work however the way that Sylus did the upgrade with the hook update in the 4.x branch wetkit_core_update_7406 is ok too , we have to support that way now going forward.

good luck

sylus’s picture

Version: 7.x-4.x-dev » 7.x-1.x-dev
sylus’s picture

jamesrward so with the recent patches you were able to get this to work on 1.x? I am still not certain about the backport but wanted to see what the status is :) Thx!

jamesrward’s picture

@sylus Yes we are running this in production and very pleased with the results. We moved the module up to sites/all/contrib and patched per #32 I couldn't get the schema number flip to apply properly so I did that manually and tried to capture it in #34 but I should probably post a patch back to the actual workbench_moderation issue queue somewhere so I can more easily pick it up automatically.

sylus’s picture

Status: Active » Postponed (maintainer needs more info)

Ah okay so it seems like there is still work to be done for backport as you had to do a manual step? I am still not 100% sure about doing this change on 1.x but in order to even evaluate I need a complete patch that has been tested and doesn't result on any changes in 4.x line nor any additional manual steps.

For now marking this as postponed.

If all that is needed is the last two patches then let me know and I can evaluate.

joseph.olstad’s picture

Sylus, here is an improvement to wetkit_core 4x that will be bulletproof for those upgrading from 1x OR older 4x versions prior to the workbench_moderation upgrade.

I've turned the pseudo code into real code.

/**
 * Updates to WorkBench Moderation and schema alignment with v1.4.
 */
function wetkit_core_update_7406() {
$workbench_schema_version = drupal_get_installed_schema_version('workbench_moderation', TRUE, FALSE);

if ( $workbench_schema_version <= '7010' ) { 
//continue executing code block in 7406

  $fields = array(
    'id' => array(
      'type' => 'serial',
      'not null' => TRUE,
      'unsigned' => TRUE,
      'description' => 'Primary Key: Unique workbench_moderation transition identifier.',
    ),
    'name' => array(
      'description' => 'The machine-readable name of this workbench_moderation transition.',
      'type' => 'varchar',
      'length' => 255,
      'initial' => 'from_name',
    ),
  );
  // Add index too.
  $index = array(
    'primary key' => array('id'),
  );

  db_add_field('workbench_moderation_transitions', 'id', $fields['id'], $index);
  db_add_field('workbench_moderation_transitions', 'name', $fields['name']);

  // Fill in the blanks.
  db_update('workbench_moderation_transitions')
    ->expression('name', "CONCAT(from_name, '-', to_name)")
    ->execute();
}//end of schema verification check
}

So commit the above code to wetkit_core/wetkit_core.install 4.x

Then all you have to do is apply jamesrward patch 32 to 1.x and then 1x and 4x are golden.

done, and its compatible upwards and backwards

the key is this small change in wetkit_core.install 4x

$workbench_schema_version = drupal_get_installed_schema_version('workbench_moderation', TRUE, FALSE);

if ( $workbench_schema_version <= '7010' ) { 
//continue executing code block in 7406
//.......... code
joseph.olstad’s picture

Status: Postponed (maintainer needs more info) » Needs review
jamesrward’s picture

The only issue is that I don't know how to add the patch in #34 to the makefile in #32. If I could accomplish that, then there would be no manual step. The fact that this patch (#34) is outside of the project (workbench_moderation) is tripping me up. If there is a way to resolve that here let's do it, otherwise I can post that patch in a workbench moderation issue and we can add it to the makefile in #32 and all should be well for 1.x.

sylus’s picture

I can bring in the minor change to 4.x for the hook_install as isn't any logic change. I assume this has been tested from the whole upgrade path?

As for bringing this fix back to 1.x I am less keen on. For the primary reason i don't have the appropriate tests on the 1.x line to ensure everything is working as expected like on 4.x with our expanded behat tests to do with workbench moderation. It is true that all we are doing is bringing 4.x functionality back to 1.x but as 1.x is just security releases only. If issues arise from this backport they won't be supported unless can be reproduced in 4.x.

I think I will just bring the minor change to 4.x and can't point anyone else that wants to update WB in 1.x to this issue. Otherwise encourage to move to 4.x.

sylus’s picture

Shouldn't:

if ( $workbench_schema_version <= '7010' ) { 

Instead be:

if ( $workbench_schema_version < '7010' ) { 

Without the '<=' as we don't want to run if workbench moderation has schema of 7010?

joseph.olstad’s picture

Sylus, yes you are correct, it should be < '7010' because if jamesreward is upgrading his workbench_moderation will be at 7010 because he upgraded manually, so when he upgrades to 4.x we will need that check in there so that the 7406 code doesn't run.

Good catch. So yes,
if ( $workbench_schema_version < '7010' ) {

thanks. This will be a good check to have for the 4x branch.

we spent a lot of time on workbench_moderation to get this far.

joseph.olstad’s picture

so:

function wetkit_core_update_7406() {
$workbench_schema_version = drupal_get_installed_schema_version('workbench_moderation', TRUE, FALSE);

if ( $workbench_schema_version < '7010' ) { 
//continue executing code block in 7406
// code

then of course the extra bracket (curly braces)
}

sylus’s picture

One last possible issue:

Shouldn't:

drupal_get_installed_schema_version('workbench_moderation', TRUE, FALSE);

Instead be:

drupal_get_installed_schema_version('workbench_moderation');

As the second argument should only be true after modifying the system table which we aren't. See: https://api.drupal.org/api/drupal/includes%21install.inc/function/drupal...

sylus’s picture

Status: Needs review » Closed (fixed)

I ended up using the last bit of code added to wetkit_core.install for 4.x.

As for the 1.x branch this issue and last two patches should suffice for anyone wishing to update.

joseph.olstad’s picture

drupal_get_installed_schema_version('workbench_moderation', TRUE, FALSE);

is slower but possibly safer than

drupal_get_installed_schema_version('workbench_moderation', FALSE, FALSE);

we want the last parameter to be FALSE so that the return value is a string as I'm comparing a string in the if statement.

sylus’s picture

The last value is defaulted to false when not entered so should be fine.

joseph.olstad’s picture

oh yes default is FALSE. Thanks again

  • sylus committed 206e93e on 7.x-4.x authored by joseph.olstad
    Fixed WetKit Core for Issue #2633456 by sylus, jamesrward, joseph.olstad...
sylus’s picture

Status: Needs review » Closed (fixed)