Hi,

Module sounds great.
However I get the following error : Call to undefined function context_load() in ...sites/all/modules/profile_page/profile_page.module on line 382

It seems that it requires the context module which I can't use because it breaks some of my developments.

Is there a workaround ?

Thanks

Laurent

Comments

lelizondo’s picture

it ia dependent in the context module. This module is still on dev and that dependency is gonna go away eventually.

You could fix this very easily. Just search for that function and remove all the references to the context module. Nothing is going to break because what is only doing is setting a context automatically instead of doing it manually.

agence web coheractio’s picture

Thanks

I've removed the call to that function but the user page is now empty.

Laurent

lelizondo’s picture

That's the intention. You have to options. You can copy the tpl.php file and create your own layout just the way you want it, adding as much data as you need but without having to remove all the drupal stuff it adds by default.

The second option is to drop blocks to the profile page. You could use th context module for that. Its very easy and it allows you to even define different layouts for different conditions.

agence web coheractio’s picture

Thanks.

How can I get the separated tabs as you have on the project page ? I only have "profile" and "view" and "edit" have disappeared

Laurent

lelizondo’s picture

you mean the settings?

just to go http://example.com/settings/some_user_uid

If you mean the Profile, you can still use views to do things like 'profile/%/someview' and use the uid as argument and it should work.

agence web coheractio’s picture

Status: Active » Closed (fixed)

Works great indeed.

Many thanks

Laurent

lelizondo’s picture

Thanks. Please help this project by contributing ideas on how we can solve this problem.

agence web coheractio’s picture

Hi,
Though your module really improves ergonomy of the account management, I think the difficulty to implement it comes with multiple ways to access user profile.
When the module is activated, I think it shall replace most user/* paths but not all (which makes the difficulty)

To do this I have implemented rewriterules in the .htaccess. Maybe this can be done directly by altering menu path in the module.

Here are my rewrite rules if this can help someone:

  # necessary for profile2.module
  RedirectMatch permanent /profile-main/(.*)/edit$ /settings/$1/profile2
  
  RewriteCond %{REQUEST_URI} ^/user/([0-9]+)/edit$
  RewriteCond %{QUERY_STRING} !^pass-reset-token(.*)$
  RewriteRule user\/(.*) /settings/$1 [R=301,L]
  
  RewriteCond %{REQUEST_URI} ^/user/([0-9]+)$
  RewriteRule user\/(.*) /settings/$1 [R=301,L]
  
  RewriteCond %{QUERY_STRING} ^destination=admin/people$
  RewriteRule user\/(.*)\/edit /settings/$1 [R=301,L]

Regards

Laurent
Agence Web Coheractio

lelizondo’s picture

I rewrote the module from scratch with the idea of releasing a stable version and I will be publishing it soon, maybe even today. This new version will separate the Profiles and the Settings because there might be cases where only one is required.

In the module, some user/* are disabled, unfortunately, there are aspects where I can't disable a path because some paths are used by admins, but at least the experience for regular users will be improved (I think).