Hi,

Today is the second time I need to upgrade linkit from 1.x to 2.x and I run into some problems because of the default profile.

First I need to deploy the changes programmatically as I cannot click through all my website instances to configure the profiles. I didn't find any easy and straitforward way to modify the default profile programmatically so what I'm trying to achieve is to create a new site specific profile and disable the default one. My site profile will be deployed using a deployement feature and the default will be disabled using hook_update (using ctools_export_load_object() and ctools_export_set_object_status()). That's for my context.

Problems I run into are the following:
1. The default is assigned to "authenticated user" role, meaning that I cannot use that role in my site specific profile even if the default profile is disabled !
2. The default profile weight is the lowest available so I cannot force my site profile to get precedence on the default one.
3. I cannot use the default profile because I'm not be able to package it in a feature as it already defined as an exportable.

Any tips or thoughts about that ? Couldn't the profile thing be modified in a way that allow easier code deployment/management of profiles ?

Thanks,

Seb

Comments

anon’s picture

Yes, you are right about this. In fact I have also discovered this issue lately.

My only suggestion is that we should remove the entire default profile and make the users create thier own.
What do you think about this?

wanjee’s picture

I think it shouldn't be in the way. IMHO solutions are either to remove it entirely from the module or provide it disabled as an example if necessary. Maybe in a README file if needed, by describing a full example for those who would like to deploy a profile without using features.

If it's removed users should be warn they have an action to accomplish to make the module functionnal (i.e a simple drupal_set_message on module activation)

Thanks !

Seb

wanjee’s picture

As a side note, the limitation to use a user role is only a single profile is a problem. Wouldn't it be possible to remove that limitation ? The profile is still used depending on its weight so only the one for that role and with the lower weight would be used ? (I didn't dig into the profile selection code so maybe this is totally wrong ;))

anon’s picture

I'm into entirely removing it form the module.

But I don't think that we should remove it for those who are using it. I wonder if there is people who is using the default profile as it is (I.E they haven't save it into the db).
In that case, we could just remove the hook.

But If someone is using it as it is, and we delete it, they will have a message in the modal telling them that there is no profile assign with this role (This check is already in Linkit core).

We could add a message when the module is enabled that tells the user something like "Linkit was successfully installed, you'll have to create a profile in order to use Linkit. Create your profile here[link]."

anon’s picture

Status: Active » Fixed

I have now commited a fix.

  • Deleted the default profile hook
  • Added a message when the user installas Linkit.
wanjee’s picture

Thanks !

I think it will help those who deploy their websites using code :)

Seb

Status: Fixed » Closed (fixed)

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

batigolix’s picture

The README still mentions that a default profile is created on install

Linkit has profiles, which means that settings are bundled with a profile
By default, we provied you with a default profile, with default settings.

batigolix’s picture

Status: Closed (fixed) » Needs work

So an update of the README would be nice (will do it myself when I get Linkit working and when I understand the profiles completely)

anon’s picture

Status: Needs work » Closed (fixed)

The readme was updated 26 Jun.
Check the commit 3c45c412645eedf8dc5fef6f42b7b117c72b5994