Jump to content

Search the Community

Showing results for tags 'defect'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. I came across this earlier <https://processwire.com/talk/topic/5673-how-to-assign-users-to-page-field/?p=65747> and thanks to Soma I worked around it. I just came across it in a different context and forgot and spun my wheels. Unless I'm really misunderstanding, there's a defect in the lack of symmetry between using TypefieldPage in selectors in the $pages->find() vs. PageArray->find() and there should not be. Plainly, the following code should not behave like it does. The find() against the PageArray should return the same result but doesn't in the 1st example using name instead of ID. // a problem with TypefieldPage in selectors $selector = 'tags=plain'; echo "using \$selector : {$selector}\n"; $res = wire('pages')->find( $selector ); echo "using \$pages->find : {$res->count()}\n"; $res1 = $res->find( $selector ); echo "using pageArray->find : {$res1->count()}\n"; // versus $tag = wire('pages')->findOne( 'template=tag,name=plain' ); $selector = "tags={$tag->id}"; echo "using \$selector : {$selector}\n"; $res = wire('pages')->find( $selector ); echo "using \$pages->find : {$res->count()}\n"; $res1 = $res->find( $selector ); echo "using pageArray->find : {$res1->count()}\n"; /* output: using $selector : tags=plain using $pages->find : 1 using pageArray->find : 0 using $selector : tags=1343 using $pages->find : 1 using pageArray->find : 1 */ It's because the find/matches/(filter) methods work differently in Pages than in PageArray. I don't think this should be so. FYI, in this case, I'm building a form where tags can be assigned as a filter. It works well using tag->name if the filtering is against $pages, but not if it's against the results of $pages->find(), which I need because I need 2 layers of filtering. On to using tag->id... Did I mention I freeeekin' loooove pw? I do I do!
×
×
  • Create New...