Jump to content

Lance O.

  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Lance O.

  1. I just cleared the compiled files from the main Modules page and that seems to have removed defaults when adding new products manually.
  2. This is a site that I developed. I originally imported the products via the API. Only now default values are used when adding a product manually through PW. It seems to me that there is something cached that is causing defaults to appear. There are no hooks or modules that add defaults.
  3. I am using a "Page Reference" field to assign tags to products. The "Page Reference" field uses an input field type of "AsmSelect". In the "Settings specific to 'asmSelect'" section, the "Default value" is empty. However, there are four tags automatically added when I create a new product page. Every new product includes these same four tags. I'm using PW 3.0.62. Can someone confirm if this is a bug in this version? If it is, I need to let my client know that it will be fixed in an upcoming release. Or is something else at play here? Exported "tags" field is below: { "tags": { "id": 257, "type": "FieldtypePage", "flags": 0, "name": "tags", "label": "Tags", "derefAsPage": 0, "inputfield": "InputfieldAsmSelect", "parent_id": "/tags/", "template_id": "tag", "labelFieldName": "title", "collapsed": 0, "usePageEdit": 1, "icon": "tags", "allowUnpub": "", "defaultValue": "", "template_ids": "", "findPagesSelect": "", "findPagesSelector": "", "labelFieldFormat": "", "addable": "", "showIf": "", "columnWidth": 100, "required": "", "requiredIf": "" } }
  4. Has anyone had any recent experience displaying Facebook posts using the Facebook PHP SDK? I find the Facebook documentation to be confusing and I'm coming up short in finding recent information and code examples online. Any help is appreciated.
  5. I've created a Page field that uses a custom hook (included in /site/read.php) that lists all users with a role of client. $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->name == 'client') { $event->return = $event->pages->find('template=user,roles=client'); } }); When I log in as the superuser, the list of users displays correctly. However, when I log in using an admin role that I created, the list is empty. I've given full permissions to the "admin" role. Why can't the admin role see the list of users? The ultimate goal is to create a user with a client role, then assign the user to a specific page in the site using the Page field.
  6. After a bit of digging, I found more granular control over user permissions here: https://processwire.com/api/user-access/permissions/#user-admin-permissions
  7. Is there a way to hide specific users on the Access > Users page from other PW admins that are able to administer users?
  8. I have a custom login page where a user should be directed to a members only page when the form is submitted and the user has been validated. What is wrong with my logic in the code below? Regardless of the user's role, the user is never authenticated and displays as a guest. if ( $input->post->user || $input->post->pass ) { // user submitted the login form if ( $session->login($input->post->user, $input->post->pass) ) { // user was authenticated and logged in // user has "admin" or "superuser" role foreach ($user->roles as $role) { $content .= $role->name . "<br/>"; } } else { // user is not authenticated // user is "guest" foreach ($user->roles as $role) { $content .= $role->name . "<br/>"; } } } elseif ( $input->get->logout ) { // page was accessed with ?logout=1 GET variable, so log them out $session->logout(); $content = $form; } else { // user arrived at login page for first time $content = $form; }
  9. I'm writing documentation for client training and I have a silly question. What is the "official" name of the default listing view in PW?
  10. adrian, are you suggesting that the username and the page names should be the same?
  11. That would be the ideal method. I've updated my original post to make the example clearer.
  12. But each user needs to have access to only one of those 100 pages.
  13. My client has a need to create a new PW admin user and assign permissions that restrict access to only one assigned page of the site on the frontend. Each user only has access to the single page that is assigned to them. Example: User #1 -> Page #1 -> Access User #1 -> Page #2 -> No Access User #1 -> Page #3 -> No Access User #2 -> Page #1 -> No Access User #2 -> Page #2 -> Access User #2 -> Page #3 -> No Access User #3 -> Page #1 -> No Access User #3 -> Page #2 -> No Access User #3 -> Page #3 -> Access etc. There may be 100 different users that all need access to just their page. Without having to create 100 templates and manage access through the template, what is currently considered the best method for restricting page access? All of these pages should use the same template.
  14. This issue may have been answered earlier, but I'd like a little clarification if possible. The site I am developing has one section that is translated into French Canadian. Only the pages in this section are translated. The site's Home page is only in English, which is the default language. The English name setting on the Home page is blank, and the French name setting is "fr". All of the pages in the translated section have the Active? checkbox next to the French name on the Settings tab checked. No other pages have this option checked, including the Home page. URL examples: http://domain.com/drainage-pipe-products/ http://domain.com/fr/drainage-pipe-products/ When viewing the http://domain.com/fr/drainage-pipe-products/ page, links included in the page's navigation automatically include the /fr/ in the url, even though those pages don't explicitly have the Active? checkbox selected. That's not the behavior I was expecting. Is this normal behavior? If this is normal behavior, then what is the purpose of the Active? checkbox? Have I configured something incorrectly? Any insight is appreciated. I feel like there is something I'm missing.
  15. I'll try these suggestions. Thank you!
  16. I've checked the forums for an answer that works, but I can't seem to find one. Sorry for having to post this question. Upon dragging and dropping an image into a file field in the PW admin, I receive a "Filesize 11594 kb is too big. Maximum allowed is 8192 kb." error. I've updated the PHP ini settings to the following, yet I'm still receiving the error: file_uploads = On max_execution_time = 120 max_input_time = 120 max_input_vars = 1000 memory_limit = 512M upload_max_filesize = 50M I'm using PW 3.0.33. What am I overlooking? Is there a PW config setting that I need to set?
  17. I should have mentioned that I already have those two lines commented out before I posted my question. But now that I check the sitemap.xml file again, the "www" has been added to the urls. Looks like it may have just been a caching issue. Thanks for your insight!
  18. Is there a way to force "www" on the links generated in the sitemap.xml file?
  19. @cb2004 This is exactly what I needed. Thank you!
  20. Is this module compatible with PW 3.x? I just installed it but the Help tab isn't displaying for the designated template.
  • Create New...