cst989 Posted June 11 Share Posted June 11 We have just updated a ProcessWire site from 3.0.184 to 3.0.229 and the following selector has stopped working: template=news-post,image|slideshow|video_embed!='',sort=-created In other words, I'm trying to grab the latest articles for featuring on my homepage, as long as they have at least an image, slideshow or video - if not, they're not suitable for the location. Is there an obvious reason this should've stopped working in the latest version, and/or an alternative approach? Link to comment Share on other sites More sharing options...
cst989 Posted June 11 Author Share Posted June 11 I solved this by creating a new field and saving it with a hook, essentially... if($page->template == "news-post") { $page->set('has_media', $page->image->count || $page->slideshow->count || !empty($page->video_embed)); } now I can just check if has_media=1 But I'm still curious why my old approach stopped working 1 Link to comment Share on other sites More sharing options...
Robin S Posted June 12 Share Posted June 12 You could try the latest dev (3.0.239) to see if it's an issue that has been fixed since 3.0.229 was released. If it's still present in the latest dev then please open a GitHub issue so Ryan can investigate. 1 Link to comment Share on other sites More sharing options...
cst989 Posted June 12 Author Share Posted June 12 Just checked and yeah, it's fixed in 3.0.239 ? 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now