Jump to content

gebeer

Members
  • Content Count

    1,007
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by gebeer

  1. Thanks. Actually that is not my idea. Got it from another thread here.
  2. Thanks for the hint. But again, which path statements? Never had issues before when moving sites.
  3. Which path statements do you mean? Are they stored in the DB or in some config file? Can't find anything related to paths in config.php.
  4. I don't want to bloat the standard user profile. That is why I store all additional user info in those profile pages.
  5. Hello, I have a similar case like described in bwakad's post. But I don't want to ask there since the post is already marked as solved. My site has users with role "frontend" assigned that can edit their user profiles and add stuff on the frontend. frontend role setup: The user profiles are all stored in pages with template "userprofile" That template has these access settings: All user profiles live under a page "Profiles" that also has the template "userprofile": Now I would expect that the "Profiles" page only appears in the menu when a user with role "frontend" is logged in. But the menu item does not get displayed. I'm also using the function to display bootstrap menu item but bwakad's workaround seems a bit awkward (excuse the pun ). Does PW just work that way or is my access and permission setup wrong somehow? And how do I get the "profiles" menu item displayed only to users with role frontend?
  6. Hi, On a 2.5 install I try to add a second super user. After adding and saving it with password assigned, It gets displayed with a strike through in the user list. When I then edit and save it again, I get this error: Missing required value Required password was not specified. But the password was entered already when I added the user. This is happening only on a clone of an install on my dev server. When I add the same user on my local environment, everything is working as expected. The install on the dev server is the same where I get the persistent httpHost error described in my other thread. Also the httpHost error message gets displayed twice, above the user list and on the very top: I have other PW installs on that server which are all running smoothly. Any pointers to a solution would be great. Thank you.
  7. Hi all, after moving a new 2.5 install to a different server, I always get this error message in the backend: Unrecognized HTTP host: 'subdomain.mydomain.tld' - Please update your $config->httpHosts setting in /site/config.php The entry in config.php contained the new domain when I installed. Then I set the entry to an empty array. $config->httpHosts = array(''); But the error still displays in the backend. How can I get rid of it?
  8. @quickjeff yes exactly. Frontend users should be totally ignorant of the admin in my usecase. @adrian great, thank you for that module! "Again what learned", like Lothar Matthäus, a german football player, once said
  9. It is logical. The PW API supplies method which we can use to render forms through the API. There are predefined input field types that we can use. @netcarver You're right. I added an issue on github.
  10. I just doublechecked. The label is not hardcoded in the __render() method. It says $this->label = $this->_('Set Password'); Where _('Set Password') is a translatable string. So if I add a translation for it, I should be able to change it. Only where would I translate it?
  11. you posted while I was still writing. For normal input fields like InputfieldText and InputfieldEmail the label override works just fine. It seems to be only the password field. So it seems not that big of an issue to me and I can live with it. But I will add it as an issue to see what the reason behind hardcoding in the render method is.
  12. Thanks netcarver! I'm creating a form where users can change their password. So I need 2 fields to be able to check for typos. That's why I initially wanted to use the built in password field because it provides the validation field out of the box. But I'm thinking of switching to 2 custom inputs and doing the validation logic myself. Just thought it would be easier to reuse something that's already there....
  13. Awesome, thank you blad! Would be better to not require js for the task. So the hook after render is something I will investigate further. Cheers Gerhard
  14. Hello, I'm using the API to populate a form in the frontend with PW 2.5 My code for appending password field // create password inputs $field = $modules->get("InputfieldPassword"); $field->label = "Set new Password"; $field->attr("id+name","pass"); $field->required = 1; $form->append($field); Whatever string I set $field->label to, I always get "Set Password" as label. Is it possible at all to change the label on InputfieldPassword?
  15. I'm using redirects to a profile page, too and also the custom backend login. I am just wondering if there is a way to create user roles that only have access permissions for the frontend (like the guest role). If I log my frontend role user in to the backend, they are presented with a barebones admin where they can't do anything but logout. But still, they can login to the admin.
  16. SiNNuT says I tried this setup. My user only has the guest role and a custom role "frontend". The role "frontend" has permissions page-view and the custom one "frontend-edit". I can login with the user into the admin. How can I avoid that and effectively ban users from the backend?
  17. Thank you Soma, now I know how to get around the throttle. I took some code from renobird if($session->login($user, $pass)) { // login successful $session->redirect($page->path); } else { $session->login_error = 'Login Failed. Please try again, or use the forgot password link below.'; } It is working fine. Any advantage of storing the error in $session over your example with $error? Or is this just personal preference?
  18. Running 2.5 stable, I tried Soma's code for error handling but the catch statement seems to be ignored when I enter a wrong username or password. Is this normal behaviour or am I missing something?
  19. @SteveB would you mind sharing your code as is (github/zip file/PM)? That would be awesome. I've been digging through the forum to accomplish the same thing and am halfway into some working code. It would be great to have some additional example code. Cheers Gerhard
  20. In the console I see this error: NetworkError: 404 Page Not Found - http://www.birthfactdeathcalendar.net/wire/modules/FieldtypeMapMarker/InputfieldMapMarker.js?v=203?%3E" Is that page published?
  21. Of course you're right. This was just a leftover from when I was working with the page names instead of IDs.
  22. SOLVED When I use the page id as the selector value together with the negative search operator, it is working $page->children("tags!={$foodid}")
  23. Thanks for the enlightenment. Didn't find this info in the api. It is working fine so far with my multi page select field. Both tags*="food" and tags.title*="food" are working as positive selectors. Might be because my tag template contains only the title field. Unfortunately not :-( I tried using the page id for "food" as a selector value. It is working for positive selectors only. Butf I do $page->children("!tags={$foodid}") it lists all children again. What would be a workaround to achieve $pages->get("/places")->children("tags*=food, !tags*=accomodation") ?
  24. Hello all, I read carefully through https://processwire.com/api/selectors/ but can't seem to get negative selector to work on a 2.4.11 install. My setup: -places with tags. -"tags" field is a multi page select field. When I do $pages->get("/places")->children("tags*=food") I get all children with tag "food". But when I do $pages->get("/places")->children("!tags*=food") I get all children. But it should only return all children that do not have the tag "food". The selector api states about negative selectors So what am I doing wrong here? Might it be related to my tags field being a multi page select field? What I'm ultimately trying to achieve is $pages->get("/places")->children("tags*=food, !tags*=accomodation") Cheers Gerhard
  25. Hello Ryan, thank you for this function! I'm using it with PW2.4.11 and get a PHP Notice: Notice: Undefined property: Page::$templates_id in /var/www/pwbootstrap3/wire/core/Page.php on line 604 When I uncomment the line 'templates_id' => $page->templates_id, the notice is gone. Has anything regarding $templates_id changed in the current dev version? Cheers Gerhard
×
×
  • Create New...