I know that an issue has been created to expose settings to ctools module, but development has been done on the dev branch.
However, I don't want to use the dev branch in production environment, so I made my own patch on the current release (7.x-1.1) to easily expose settings table to features without using ctools.

Following, what my patch adds:
- title column
- machine name column
- expose to features each rule displaying title name
- export rules to dedicated file
- add rules to settings table
- revert rules

I hope it helps someone.

Comments

sebastien m.’s picture

sebastien m.’s picture

Status: Active » Needs review
StatusFileSize
new9.26 KB

I forgot to add new file to the patch.

sebastien m.’s picture

StatusFileSize
new9.21 KB

Small fix about features files naming rule.

joelpittet’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Status: Needs review » Needs work

Mind re-rolling this against dev version? Doesn't seem to apply.

ryank90’s picture

Is there any further news on this functionality? None of the patches available seem to patch.

joshf’s picture

chalk’s picture

Seems that patch #3 is no longer compatible with 7.x-1.x (7.x-1.4) code of module. I had to update this patch manually for our project. Maybe it will help somebody and save your time.

cezarion’s picture

@Chalk, it seem's that the file login_destination.features.inc is missing in your patch.
I have tried to apply path 3 and after path 7 but it failed.

Do you have any idea or solution to use feature with login destination ?

Thank's a lot

chalk’s picture

StatusFileSize
new9.69 KB

@cezarion you are right! Thanks for reply. Here is an updated patch.

bwaindwain’s picture

Status: Needs work » Needs review

Patch #9 works fine for us on 7.x-1.4. Thanks @chalk

Just a heads up to anyone like me: apply this patch BEFORE installing the module, otherwise it will barf out db errors. If you already have it installed, disable then uninstall it. The patch needs to add some columns to the db on install.

damienmckenna’s picture

@bwaindwain: Did you try running the database updates after applying the patch?

SRizo’s picture

Many thanks, #9 worked for me.

Lonnytunes’s picture

The database update may fail if you had installed older patches (like patch #2 of the issue #1789652).
I fixed login_destination_update_7004() to support the quoted patch.
I hope it will work with patches of the issue #1645260 as well.

kingandy’s picture

Applying this patch raised an error on my install:

PHP Parse error: syntax error, unexpected '[' in /srv/www/httpdocs/sites/all/modules/contrib/login_destination/login_destination.install on line 240

Same on line 259, 281. Looks like shorthand array syntax which is not appropriate for this project per coding standards:

Please note, short array syntax is unsupported in versions of PHP prior to 5.4. This means that Drupal 7 core and Drupal 7 contributed projects without an explicit PHP 5.4+ requirement must use long array syntax.

Find attached a patch with these lines switched to long array syntax, seems to work as expected.

Lonnytunes’s picture

Oops! My bad! Thanks for the fix @kingandy.

Lonnytunes’s picture

Two improvements:

  • Populates 'title' and 'machine_name' columns only if we create them (doesn't touch them if they already exist)
  • Adds the uniqueness constraint on the 'machine_name' column only after having populated it with unique identifiers (to avoid an error when adding the constraint)

(New patch based on the patch #14)

joelpittet’s picture

Is the old_machine_name still needed?

Lonnytunes’s picture

@joelpittet: The old_machine_name? Are you talking about the name column used for the machine name before?
It will be removed after creation of the new machine_name column.
Same treatment for the label column replaced by title.

earthangelconsulting’s picture

just thought i would mention... i applied #16 to login_destination 7.x-1.4 a few years ago and it worked PERFECTLY, totally fills the bill!

big thanks to all who contributed to that patch!

early today i applied #16 to 7.x-1.4+8-dev (latest dev release, dated 2021-05-15) and it works fine there too :-)