Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. Are you maybe replacing the find() method somewhere? $pages->find() does always return a PageArray and never null.
  2. Try this, but it can only work for direct descendants, not for a whole tree. parent.status!=hidden To get the whole tree excluded you'd need a more advanced selector, which only works on db calls and not for runtime filtering: has_parent!=[status=hidden] This does first call all hidden pages and then exclude them with the has_parent selector
  3. You can just edit the first post and choose "Use Full Editor" to edit the topic title.
  4. Are you changing the output-formatting of the user page somewhere (e.g. to save things to it). Imagefields do only pretend to be single value if output-formatting is enabled for the page. Internally the file and image fields are always multi-value, independent of your settings in the backend.
  5. Pagination is done by urlsegments so the url shouldn't have get strings, but rather an …/page2/ at the end of the url. And just to quote Ryan on that (comment on the pagination docs)
  6. Could you try if moving those pages in the page tree and setting them back in place does change the behavior? Are those pages created via the api / backend / copied?
  7. The difference between find and get is in this case the different selectors that get build: $entry->find() -> $pages->find("has_parent=$entry->id"); $entry->get() -> $pages->find("parent_id=$entry->id"); If you'd supply a selector, it will be added to the one shown above. If you still find an issue with these, then Ryan needs to check the PageFinder. One useful info: Which version of PW are you using? There where issues with the table holding information about page parents when copying pages.
  8. // Should be automatically sorted like the page-table field. $page->pt_contents->get("template=part_text");
  9. Maybe try markdown syntax [Title](http//:…/). This at least works for the description/notes.
  10. It's using the basic select inputfield, that's why I even wondered about it.
  11. I've a really strange issue. I've a page, where all children should be accessible by a dynamic role. But somehow one of the users assigned the role can only see two of the seven children. All those pages are not accessible without the dynamic role and the drole interface shows all the children, which should be accessible. And thought on that or tips on how to debug this?
  12. Somehow the module seems to not work on user pages. I've users with an alternative user template, that holds a select pagefield. But even thought the checkbox to add the link is checked, there's nothing rendering.
  13. The value is meant to be use for the html value attribute, therefore markup has to be striped. Use $field->label and $field->label2 to change the texts around the checkbox.
  14. I'm not sure if this is such a good idea in this case, as hooking the path can be quite a performance hit, but maybe you could do it this way, so normal pages aren't hooked: $this->addHookAfter("User::path", $this, "modifyUserPagePath"); AND public function modifyUserPagePath(HookEvent $event){ $user = $event->object; $page = wire('page'); if($p->hasRole("ambassador")){ $event->return = $page->url.$user->name."/"; } }
  15. Maybe like this: $page->isChanged("status") && $page->is(Page::statusUnpublished);
  16. Sorry to be a bit picky, but I cannot find any issue with your code, so we check this: Do you mean by "output pages" the children you're showing in the list? This would be wrong. You'd need to enable pagination on the template where you're rendering the list, not in the template of the list-items. The setting just enables, that ProcessWire parses the urlSegments correctly, this has nothing to do with the paginated content.
  17. That's still something I wouldn't necessarily let php do, but a dedicated image processor on the server. Otherwise maybe have a look at this: https://processwire.com/talk/topic/9814-client-side-image-resizing/ Move the resizing work to the client and submit the original and a reasonable sized image. Save the original in a file field and just use the second one to generate thumbs.
  18. Did you change anything to the FieldtypeComments.module besides replacing some class names? Neither sleepValue() nor getDatabaseSchema() seem to have any reference to a new rating field, that should get saved. Edit: If this is your first time working with Fieldtypes I'd suggest looking at the FieldtypeEvent module. It's very well commented to serve as kind of tutorial for creating / modifying these.
  19. While this is most of the time right it's not working in this case. You can only hook the path function for all pages, but not for single instances. Edit: Link to Ryan's statement about the fact: https://github.com/ryancramerdesign/ProcessWire/issues/1108#issuecomment-95933754
  20. Could you provide the code somewhere? I think it'll get hard to debug this just from your sentence.
  21. Did you also change all places, where InputfieldCommentsRatingAdmin is instantiated? Maybe somewhere there's a "new InputfieldCommentsAdmin()" left, which still calls the old module.
  22. Here you've the statement from Ryan about this: https://processwire.com/talk/topic/580-encrypted-urlsegment/?p=4652 @Evan Most likely you're tags will be created as pages, therefore they'll already have a pageName. Just use this as urlSegment and you're good to go. If you want to use the new options fieldtype you could instead use the value|Label syntax. E.g: A german tag "Männer" would could get the name "maenner" (Page) or be defined as option like this: "1=maenner|Männer". Both would work for this url: example.com/tags/maenner/
  23. Maybe I'm wrong about this, but why would one try to resize such a large image with php? I doubt this being efficient in any way.
  24. It's the FieldtypeComments folder, but the module throwing the error is InputfieldCommentsAdmin.module. Copy that one, too, change the TypeHint and you're good to go.
  25. Try this one: http://processwire.com/docs/tutorials/troubleshooting-guide/page3
×
×
  • Create New...