Jump to content

hellomoto

Members
  • Posts

    353
  • Joined

Everything posted by hellomoto

  1. 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 unchecked "Don't allow pages to change their template?", cloned user template (id=75), added "$config->userTemplateIDs = array(3, 75);" to config.php 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.
  2. I follow the instructions exactly and when I add a new user, there's only the name field, not template, and once I enter a name and create, go to Settings tab, the one I have set for the alternate user tpl doesn't appear in the list. What a shame.
  3. Of course! I have to use include=all for other things already (like field options for public pages, which themselves are hidden)... man. Thank you. Okay, so that I did and it works as expected. However, since posting this thread I did go ahead and try the alternate user template/parent example given in that blog post I linked, and followed every step... but it didn't work. I try, try again.
  4. MatthewSchenker: I like DynaTable.
  5. Hey thanks guys. I've realized the ease of simply exporting a site profile, which is serving me well. Someone else pointed Migrator out to me too, but with the profile export I haven't even gotten around to trying that yet... I do have it installed...
  6. I have a page /team/ with url segments [1] enabled, that must equal the name of a user with a 'broker' role. On /team/ a list of all users with the 'broker' role is rendered. It does not appear if I am not logged in though. How can I enable this info to appear universally? I mean for public visitors to be able to view it as well... Then this http://processwire.com/blog/posts/processwire-core-updates-2.5.14/ has got me curious about user hierarchy, as my site will require entirely different types of users that might as well have different input fields per type, hence different templates... Are they still accessible via the $user variable if an alternative template is used? or a different parent? Thanks.
  7. That link has much interesting info... Not just the multiple-modules, but alternate user templates (wasn't really sure on the status of that being supported) and different user parents, even.
  8. I had too little faith starting over again...
  9. Thanks for the reply, Jan. Sorry about the vagueness. Understandable that that error would come up due to invalid input, but now it's not saying for which field? It did just say that the field 'roles' is not present, which I know... so I removed that specification from the visibility, but then I can't restrict visibility based on user role(s)? Then I remove the field and again it only says, "Session: Profile not saved".
  10. Thanks for trying it out. I'm using 2.5. Debug was set to false... =\ But so I went back to the screwy installation and set its config->default to true, saved my profile successfully, though sans the supposed trouble field. Then I set config->debug back to false and could still save my profile... strange... Then, once I added the office_location field back to the user template, I got "Profile not saved" again. I set debug to true and it says: above the regular "Profile not saved" red message. So I removed the visibility selector, 'roles!=37'. Now when I try to save my profile, it just says: ... You did add the field to be editable via the edit-profile screen right? Not just editing the user page? Like you add the field to the template, then make it editable in the profile via ProcessProfile config, then go to /processwire/profile/ (or whatever you have as your admin path if not processwire) and you are able to save it?
  11. I know that say I have a repeater field engines, I can do foreach($page->engines) or $page->engine_field... but is there any way to do like foreach($page->engines as $e) { foreach($e->field as $field) { echo $field->val; } } That itself doesn't work. But is there some way of iterating through a repeater field's subfields? I'm trying to add repeater field support to Import Pages CSV module... If not I may just have to figure out how to write a separate module specifically for imports of a particular page template... if I can... I can try... Anybody know about this?
  12. Bump... Must I create corresponding userinfo pages per user? Has anyone else successfully added page fields to the user template? What am I doing wrong?
  13. I read a post somewhere before when I was trying to find out about this, where the guy was creating corresponding like frontend profile pages, separate from the users themselves, to store additional profile data. I know this is totally a possibility, or a number of other ways, I guess. PW, endless possibilities. But I thought I would just do it directly. I suppose I might as well take that same route though, for the same reason: not to corrupt the native user template/variable... I mean it is slightly more time consuming, but in the long run if this is going to happen it'll actually save me a ton of time. I am curious about the answer to this question but... I could just try another way. I guess I'll go look for that thread again and see what's good, how he does it...
  14. Hey thanks for the welcome. I have definitely read through much of the documentation, forums, Google searched extensively, and tried and inspected (not that extensively but somewhat) several of the site profiles already, and yes I understand the PW structural fundamentals. I have a lot going on in this site already. I put off adding this field because that's when it happened last time, and I had to put it all back together, and then some, and now I added this field again and again I have this issue and nowhere in the documentation that I have seen does it say anything about this not being ok to do. So... this is just a freak incident it seems (except for that this is the second time, so.. 2x freaky, but I still have no answers), and I am hoping that since there doesn't seem to be anything in the documentation about this error, or anywhere in the forums, and no additional information other than the profile not saving is provided, that maybe somebody in these great forums might be able to help. Hence, this, and my last post about this. I looked at ProcessProfile.module and don't see any reason the profile wouldn't be saving. It's just an unexplained error. Like, I simply did this, nothing should be wrong with it, if something is, and I'm not doing this right, please do tell: I have /about/locations/ with children location pages. These are public, with frontend templates... if it matters... So I then I add a page field to the user template, office_location, with template=location for selector. The thing is, it works. I was able to set locations for all my users with roles=broker. However... that I did by editing the users from my superuser account, and then next thing I know, I check if I can save my profile, and I can't, and neither can I logged in as anyone else. So if page fields can be used in user templates, and this is in fact a commonly done thing, why is this happening to me, what about that is wrong that I did? Why does this break the profiles? Seems crazy to me, but there must be something I'm missing here, I just wish I knew what.
  15. I just ended up installing my exported site profile this time around and luckily it worked perfectly anyway. That wasn't too long ago, I'm ok to continue from here.
  16. You mean this? https://github.com/adrianbj/ProcessMigrator Looks quite promising. Do you know if it's compatible with 2.5? I guess I'll give it a try. Couldn't hurt at this point. I hope my install isn't already screwed even if it's exported... oy... I'll see... and report back. Thanks.
  17. I have one I want to install. I copied the index.php and /wire directory to a fresh site directory and added in its /site put all the files from my exported site profile. When I access the site it says "404 page not found (no site configuration or install.php available)". How am I supposed to install this?
  18. I would think relating users to other pages would be a fairly common requirement too, so... if it is that... 1. why won't it work when I remove the field, and 2. why would it even break my user profile saving capability in the first place? How can fix this? I don't want to start over again.
  19. I posted about this before and nobody had any input. I started again from scratch on account of this mysterious problem, and I cannot figure out how to even troubleshoot it. I really don't want to have to start it ALL over again; that'd make 3 different copies going of the same project. No particular errors are given, just that it won't save. It does seem like both times this happened after adding a page field to the user template, relating the user to an office location. If I remove the field, I am still unable to save profiles. When this first happened I removed all the custom fields from the user template and disabled every module one by one. Never again could I save profiles.
  20. I'm trying to send an email notification for each inquiry submitted. Currently they're just saved as pages. I want to email notify too. So I have (mail part is at the bottom): // check if the form was submitted if($input->post->submit) { // determine if any fields were ommitted or didn't validate foreach($required_fields as $key => $value) { if( trim($value) == '' ) { $error_message = "<p class='error'>Please check that you have completed all the required fields.</p>"; $error = true; } } // if no errors, create a new page if(!$error) { $p = new Page(); // create new page object $p->template = 'vessel_inquiry'; // set template $p->parent = wire('pages')->get('/sales/inquiries/'); // set the parent $p->name = $input->post->vessel_id . '_' . date('YmdHisu') . '_' . $input->post->user_id; $p->title = $input->post->title; // set page title (not neccessary but recommended) $p->save(); //create the page // populate fields $p->message = $input->post->message; if($user->isLoggedin()) { $p->user = $input->post->user_id; } else { $p->fullname = $input->post->fullname; $p->email = $input->post->email; } $p->vessel_id = $input->post->vessel_id; $p->status = $p->status | Page::statusLocked; $p->save(); //save the populated fields $success = true; $mail = new WireMail(); // chained method call usage $mail->to('my@email.com')->from('some@email.com')->subject('Message Subject')->body('Message Body')->send(); } This is just to test email sending period. (The to and from emails are actually different ones that I have access to.) I've tried several times to submit inquiries and am not getting anything in spam or anywhere. I'm using XAMPP on OS X. I know email is complicated and not exactly a ProcessWire matter but do you guys know how I might be able to troubleshoot or resolve this? Surely others here have experience using wireMail() on similar setups... Thanks much.
  21. $page->set($fieldName->address, $value); does not seem to work.
  22. I have a model field that depends on the selected manufacturer. Its options update upon manufacturer selection (both are page select fields). In my model field > Input tab > Selectable Pages > Custom selector, I have: parent=page.make, template=model, sort=title, include=all Where 'make' is the name of my manufacturer field. Try that?
  23. This works for me to support page references in Ryan's ImportPagesCSV.module, in function importPageValue: elseif($field->type instanceof FieldtypePage) { $value = trim($value); if(wire("pages")->find("$name=$value")) $page->set($name, $value); } I need to also be able to import repeater fields though.. Anyone know how to do that?
×
×
  • Create New...