Jump to content

$config->userTemplateIDs -- anyone implemented this so far?


hellomoto
 Share

Recommended Posts

I'm working with a PW 2.5.3 install. Here http://processwire.com/blog/posts/processwire-core-updates-2.5.14/ there is a quick tutorial on setting up an alternate user template and parent. I followed it to the T, but it didn't work; when adding a new user, there was no choice of template, and once the user was created the alternate template I had set wasn't even among the select options. Has anyone managed to do this or even just an alternate template successfully? The alt. tpl. is what I rly. need... I just tried it twice over and then erased and undid everything 2x too, so... Then I only

  1. unchecked "Don't allow pages to change their template?", 
  2. cloned user template (id=75),
  3. added "$config->userTemplateIDs = array(3, 75);" to config.php
  4. created a new user

No alternate template option still. This should be able to work right? Because I don't see a date for that blog post but do only see comments from 5 days ago, but it says 2.5.13, I'm using 2.5.3.

Link to comment
Share on other sites

Features that are released for the 2.5.14 version are not going to work in your 2.5.3 install.

Here http://processwire.c...updates-2.5.14/ there is a quick tutorial on setting up an alternate user template and parent. 

You would need to first update to Development version 2.5.14 to gain access to these features, as they are introduced starting with this version.

Edited by cstevensjr
  • Like 5
Link to comment
Share on other sites

Thanks Cstevensjr. & Sorry, Lost. I'm running around like a chicken without a head forgetting all my other threads... I'll be sure to check the ones I got going before posting any new topics from now on.

So 2.5.14... that's a 14, not like .14, huh? So that it's greater than 3? Now I get it.

Thanks a lot guys. I have upgraded to dev :) Now I should have success.

Link to comment
Share on other sites

... Actually... now I can't log even log in, since trying to create a new user (got an error right when I clicked to add one); I get the below error, trying to access the front- or back-end. I exported my site profile just before upgrading though, so I'm not really worried... I have the original/stable wire dir and index.php too but I don't think restoring those will help much.

Catchable fatal error: Argument 1 passed to Users::setCurrentUser() must be an instance of User, instance of Page given, called in /wire/core/Session.php on line 76 and defined in /wire/core/Users.php on line 39

Recoverable Fatal Error: Argument 1 passed to Users::setCurrentUser() must be an instance of User, instance of Page given, called in /wire/core/Session.php on line 76 and defined (line 39 of /wire/core/Users.php) 
This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged. 


Ah, gotcha. Thanks Lost.

Link to comment
Share on other sites

And now... in a new PW master unzipped dir, I add my site-profile alongside all the others in its root, but it doesn't show up in the Installation Profiles select. Anything I might be able to do to get it to show up..? 


Yeah I undid my changes since they didn't work, I didn't want to just leave bogus settings =\ 


I should probably just hold off on these advanced user configurations. Now I just want my site back.

Link to comment
Share on other sites

You can always revert updates of processwire by replacing wire/, index.php and .htaccess with the old ones. If you're using this https://processwire.com/talk/topic/7525-module-processwire-core-upgrade/ than these files should be there already as hidden files. The modules additionally does a optional database backup on updates. 

  • Like 1
Link to comment
Share on other sites

Thanks Lost. Good to know that that module keeps the originals too (and can back up the db), I don't see any reason not to use it next time. I was probably too fried from having tried doing that same tedious process a few times over already and messed something up... 

I got the site back by the way I feel like I must have mentioned it probably elsewhere, me with my multiple threads on the same topic... I just had to restore a db backup from 6 days prior instead of the site profile I had just created that day. No big deal, it's back up to date now.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...