Jump to content

gmclelland

Members
  • Posts

    577
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by gmclelland

  1. I've never tried this before, but quickly browsing the documentation at https://processwire.com/blog/posts/new-user-admin-permissions-automatic-version-change-detection-and-more-2.6.10/#new-user-admin-permissions leads me to ask you the following: Stupid questions... Did you give the "editor" role the "user-admin" and "user-admin-editor" permission? It would probably be better to create a new dedicated role "editor-managers" and assign the "user-admin-editor" and "user-admin" permissions instead of trying to have the editor role do this all?
  2. I believe you are supposed to put that information in site/config.php
  3. Maybe it's a browser caching issue? I wonder if a hard reload in Chrome would fix it? By that I mean hold the Shift key and click on the Reload button. When it's borked, can you open another browser and see the exact same problem? Have you configured any other static asset caching in .htaccess file or in something like cloudflare.com? Just some thoughts..
  4. Does it happen if you use your browser's incognito window? That would load the browser without any extensions/addons. What modules are you using?
  5. @lpa - You could replace this module with https://github.com/rolandtoth/AdminOnSteroids . See https://github.com/rolandtoth/AdminOnSteroids/wiki/FieldAndTemplateEditLinks
  6. Thanks for sharing your solution
  7. From the video, it looks like you have uBlock origin enabled. Try disabling it for that site and see if that fixes the issue.
  8. Well I was trying to say if the new page is not a calendar-posting or a community-event then return. But I guess I have my operators wrong? && seems to work. Thanks rick - from a fellow Texan!
  9. For some reason it doesn't fire if I include the following in the hook: if($page->template != 'calendar-posting' || $page->template != 'community-event') return; or if(($page->template != 'calendar-posting') || ($page->template != 'community-event')) return; It does work for: if($page->template != 'calendar-posting') return; Any idea why that is?
  10. Got it working now. Thanks Robin for the reply and the debugging tips!
  11. Hmm... @Robin S I tried your hook in my site/ready.php, but it doesn't appear to do anything. The page name/url stays the same. I do see the hook displayed in the Tracy Debugger. Any thoughts as to why it might not be working? I also tried changing: $page = $event->arguments(0); to $page = $event->arguments[0]; but it didn't seem to make a difference.
  12. Here's where it talks about the site/ready.php file https://processwire.com/blog/posts/processwire-2.6.7-core-updates-and-more/ I think I remember why I chose not to use id based urls. I was worried it might be hard to import/export pages because the ids on the other site/system you are migrating to might be different. I think that's why I chose to use the built in behavior of Processwire. In my case duplicate page names don't happen very often. I would like to hear other people's opinion on urls that contain a page id.
  13. ...updated the blog_post template prepending _ready.php .... You shouldn't need to prepend the file. I believe site/ready.php gets picked up automatically. To fix your other blog posts, just re-save them and the hook should execute and correct the page name with the correct format. If there's a bunch of posts to go through, you could use Adrian's admin actions module http://modules.processwire.com/modules/process-admin-actions/ or the process wire API to loop through and re-save the pages.
  14. That's why I created a posted_on datetime field. I manually entered the date and time into that field since it may be different than time the post was published in Processwire.
  15. On my "news" template I have a datetime field for "published_on" that I use in the parent's template(news-index) "Sort settings for children" (reversed sort is checked). I'm pretty sure the sorting works for news items posted on the same day.
  16. Your welcome. I'm still learning too! Looks like it generates and assigns a random id here https://github.com/processwire/processwire/blob/6241fd67300c456c225cb336a3de27acab167b2d/wire/core/PagesEditor.php#L343 until the page is saved. Probably to make sure the page name is unique? Pages are stored in the "pages" table. The field data is stored in each field_fieldname table. Each field gets it's own database table.
  17. Hrmm... I tried it on a site and couldn't get it to work. You might need to go the module or hook in your ready.php route. I also don't think you are seeing the correct id of the new page. We are probably seeing a temp page id, since the page hasn't been created yet. On a past site, I choose to simply not worry about the page name. When a new page is created and the name is not unique, an incrementing number will be appended to the end of it until it is unique. To make it easier to view the news postings in the page tree, I edited the template's under the "Advanced" tab > "List of fields to display in the admin Page List" setting to include the date. Someone else may chime with some other better ideas.
  18. Try it like this "$id $title" without quotes. A dash will probably automatically replace the space character.
  19. It's in the second screenshot with the Blog template. It's collapsed.
  20. If that doesn't work you may need the module from here. There's also a list of forum discussion that mention how to do it with a hook.
  21. Edit the Parent template and look under the "Family" tab and you'll see the "Name format for children" Try entering "id-title" without quotes in that field and see if it works. As described on http://processwire.com/api/modules/process-template/ You might also need http://modules.processwire.com/modules/page-rename-options/ Hope that helps
  22. You could use Cloudflare.com's DNS and set a Page Rule to set the security level to "High" for your admin url. I've never had much luck blocking IP addresses.
  23. @nabo For multilingual url fields maybe you could try this module with https://github.com/ryancramerdesign/FieldtypeURLLanguage? Sorry @anyway, I'm not sure. Maybe you can list the permission of the user's roles? Does the user's role have the page-edit permission? Did you enable access control for the field? Edit the field and click on the "Access" tab to check.
  24. Thinking about it some more... As an alternative to "Single Child", you could also use "One per parent"
  25. Seems like a good enhancement. The examples you provided were well thought out.
×
×
  • Create New...