Comments

dk129’s picture

StatusFileSize
new5.76 KB

patch is attached

grasmash’s picture

Status: Active » Needs work

dk129,

Thanks so much for your work. I'm thrilled that you've added this feature- it's something that I've been meaning to do.

However, it looks like the patch that you've attached was not rolled against 7.x-1.x-dev from the git repository. It failed 2 out of 3 hunks.

I'm granting you commit access to the repo so that you can apply your changes directly.

dk129’s picture

Hi,

Yeah, the patch is for your stable version 7.x-1.6
Tks man, I will checkout the branch 7.x-1.x-dev to work on.

Nice day.

spiderman’s picture

Version: 7.x-1.6 » 7.x-1.x-dev
Assigned: dk129 » spiderman
StatusFileSize
new7.93 KB

I've re-rolled dk129's patch from #1 against the 7.x-1.x branch. Seems to mostly work for me, except for a weird bug which I believe is a quirk with my local setup, where profile2_regpath settings don't get properly *reverted* (ie. from a features module, either on first being enabled, or --force reverted via drush).

Anyone interested in testing this new version of the patch to confirm it works as it should, and maybe we can get this committed?

spiderman’s picture

Category: support » feature
Status: Needs work » Needs review
grasmash’s picture

Status: Needs review » Needs work

This patch still needs a lot of work.

  • dd() left in code
  • Some aspects of module disabled, e.g.,
    # Not sure how to handle this..
    #  if ($groupby) {
    #    $query->groupBy($groupby);
    #  }
  • No hook_update_n() added to accommodate schema change in install file
  • Modifications to profile2_regpath_get_profiles() do not seem very well optimized. The function has been changed to always load all profile types, and then walk through the result to filter out rows. It doesn't seem like any of the new functions even use profile2_regpath_get_profiles(), so I'm not sure why it has been changed.
  • Maybe this patch is missing a file or has undocumented hooks? I see no ctools hook or ctools plugin files in the patch.
erikwebb’s picture

Is there no reason to store this information in simple variables? The data is just a flat array with no real relationships.

webflo’s picture

StatusFileSize
new6.95 KB

Added db schema migration and removed dd().

tien.xuan.vo’s picture

Status: Needs work » Needs review

change status for test

Status: Needs review » Needs work

The last submitted patch, ctools_exportable-1510700-8.patch, failed testing.

tien.xuan.vo’s picture

StatusFileSize
new6.42 KB

Applicable patch for current 1.x-dev.
Fix a small typo.

tien.xuan.vo’s picture

Status: Needs work » Needs review
tien.xuan.vo’s picture

StatusFileSize
new6.84 KB

Add ctools as a dependency.

tien.xuan.vo’s picture

StatusFileSize
new22.43 KB

Make the patch compatible with features module.

I don't know how to store the roles in profile2_regpath table, 3 choices:
1. serialize(array($rid => $rid));
2. serialize(array($rid => $role_name));
This is what I am using in this patch. (Note: I store only enabled roles).
3. serialize(array($role_name));
I think this is best for exporting to feature. (Note: Only store enabled roles)

I don't know how to test rebuild a feature.

Another thing is: I can't revert profile type (an entity type provided by profile2 module) using feature.

Sorry for my English :)

tien.xuan.vo’s picture

StatusFileSize
new22.44 KB

Fix minor bug.

tien.xuan.vo’s picture

StatusFileSize
new22.42 KB

Remove trailing whitespaces.

RobKoberg’s picture

StatusFileSize
new57.78 KB

I applied the patch in #16 to 7.x-1.x-dev. The is an entry for p2 regpath, but the label is missing. See screen grab.

tien.xuan.vo’s picture

StatusFileSize
new22.7 KB

Correct hook_update_n. Please try again.

RobKoberg’s picture

I applied the patch in 18 to a clean version of 7.x-1.x-dev, which applied successfully. However, now when I go to features, I do not see an option for profile2 regpath.

tien.xuan.vo’s picture

StatusFileSize
new22.89 KB

Thanks for your testing. Fixed no options in features page. Please try again. Don't forget to run database update scripts.

tien.xuan.vo’s picture

StatusFileSize
new23.46 KB

Fix error: Field 'profile_id' doesn't have a default value.

spiderman’s picture

I am happy to report that testing of the patch in #21 seems to work perfectly for me. I was able to add a profile2_regpath item to my feature, export it, have it take effect when enabling the feature, and change/revert it through the features mechanism (adjusting the url path).

As such, I think this patch is ready to be committed, and I will incorporate it into the project I used this for originally.

univate’s picture

StatusFileSize
new20.97 KB

Re-rolling patch.

grasmash’s picture

Thanks to everyone who's been working on this.

I'm looking to commit it ASAP. However, after some preliminary testing, I've found that this patch breaks the 'role assignment' functionality.

grasmash’s picture

Status: Needs review » Needs work

K, figured out the issue and fixed. Patch has been committed to 7.x-1.x. Next up, port to 7.x-2.x?

grasmash’s picture

Ack, just realized that the changes prevent multiple profiles from being attached to a single path, which is a major regression. Might have been too hasty with accepting the patch. Dev branch is a bit FUBAR at the moment.

grasmash’s picture

Status: Needs work » Needs review

After more refactoring, this patch has been applied to both 7.x-1.x and 7.x-2.x. Please test functionality to confirm.

RobKoberg’s picture

I just did a drush up and did not see any updates for this module. That is probably because I am using 7.x-1.12+10-dev. Are all of the changes from 7.x-1.12+10-dev in the 7.x-1.x branch now? Is it just for dev or the recommended version?

Additionally, if I go to 7.x-2.x, does any existing functionality fundamentally change or is just new features?

spiderman’s picture

Assigned: spiderman » Unassigned
Status: Needs review » Reviewed & tested by the community

@madmatter23: I've tested from a clone of the latest 7.x-1.x branch, and your newest commits appear to have achieved the goal here effectively. As with the patch above, I can update/revert a feature incorporating profile2_regpath settings, and have them take effect whether the change happens through the web interface or adjusting the features code directly. Hooray!

grasmash’s picture

Status: Reviewed & tested by the community » Fixed

@RobKoberg Please pull from git repo branch 7.x-1.x.

@spiderman thanks!

Status: Fixed » Closed (fixed)

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

gettysburger’s picture

I updated do the dev version today so that Features would remember my unique registration path as well as the default role for that profile. It did remember the settings but when I logged out and went to the registration url I got the WSOD.

xxronis’s picture

Issue summary: View changes

Is this working?
Im not getting any regpath settings in my Feature.

Tried with the beta version also
thanks

nevergone’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Closed (fixed) » Active

This is not work, profile2_regpath_features_revert() function delete all profile2_regpath settings in database.

nevergone’s picture

Status: Active » Needs work
StatusFileSize
new1019 bytes
dk129’s picture

Issue summary: View changes
ladybug_3777’s picture

I'm reading through the thread and it looked like this patch was good to go, but is actually not quite there yet? I think this status should be set to "needs" review instead of "needs work" because the latest patch hasn't passed the simple test, but maybe that patch isn't finished?

nevergone’s picture

Status: Needs work » Needs review

Okay, go to testing! :)

grigoriunicolae’s picture

Patch from #35, helped. I used it in a custom install profile, and everything works well...

ladybug_3777’s picture

Shoot! I was going to test this then I realized I'm using version 7.x-1.12 and this is against version 2 dev. I'll have to come back to testing it when I have time to get the dev version of 2 installed. :-(

ladybug_3777’s picture

This patch seems to work well, however upgrading from 1.12 to 2.0-dev caused new errors to popup (such as the title of the unique page not changing and other db issues) so I'm not sure that I want to trade one fix for a potentially buggy dev version :-(

The patch itself looks decent though! Now to decide if upgrading to 2.0-dev is worth the risk or not.

evilehk’s picture

Status: Needs review » Reviewed & tested by the community

I installed version 7.x-2.0-beta3+12-dev, and added profile2_regpath feature components to a feature module. When enabling the module in a different environment, the settings did not stick. In addition, the install profile would error out because there was no value for profile id. Applying patch #35 solved those issues.

captainack’s picture

I have been having lots of success with #35 as well over quite a few of the past few features and ctools versions. It works well, and so far, the only issue reported over a year seems to be with upgrading from 1.x, which might not have been related to the patch.

  • grasmash committed 24492fe on 7.x-2.x authored by nevergone
    Issue #1510700 by tien.xuan.vo, spiderman, dk129, nevergone, webflo,...
grasmash’s picture

Status: Reviewed & tested by the community » Fixed

  • grasmash committed b8c1f98 on 7.x-1.x authored by nevergone
    Issue #1510700 by tien.xuan.vo, spiderman, dk129, nevergone, webflo,...

Status: Fixed » Closed (fixed)

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

kylesmith’s picture

StatusFileSize
new21.81 KB

I'm using the release Profile2 Registration Path module (version 7.x-1.12) and have recreated patch #23 so the profile2_regpath ctools exportable patch can be applied to it.

The patch is working great so far.

donquixote’s picture

It is not working for me (7.x-2.0-beta3+14-dev).
The profiles still show up as "Overridden" after "drush fu" on the respective feature.
And after a "drush fr" on the destination site, the " Enable this profile on a registration form" checkbox is unchecked, and a lot of the settings are wiped.

shi99’s picture

I am having the same issue as mentioned in #49.
On Feature Revert the "Enable this profile on a registration form" becomes unchecked and disables the functionality.

kylesmith’s picture

StatusFileSize
new21.66 KB

My patch in #48 can't be applied to the updated module version 7.x-1.13. I'm attaching a new patch for the updated module (i.e. recreating patch #48 which was already a recreation of patch #23).

SRizo’s picture

StatusFileSize
new2.03 KB

Patch in #51 worked for me also for version 7.x-1.13, but did not assign roles, therefore attached a patch to realize it.

SRizo’s picture

StatusFileSize
new21.26 KB

New patch for version 7.x-1.13