PageList filtering by Select attribute will not return an empty result even if it should

Permalink 0 0 Browser Info Environment
It seems that the PageList returns ALL results when it should return NONE when filtering by a Select Attribute Type.

See below simple page list:
$list = new PageList();
$list->filterByCollectionTypeHandle('job');
$list->sortByPublicDateDescending();
$list->filterByJobDepartment("Customer Service");
$list->getQueryObject()->setMaxResults(8);
$jobs = $list->get();


We filter by a page type - works ok.
Sort by date - works ok.
Filtering by 'job_department' which is a Select attribute, and exists on ALL 'job' page types.
Max results - works ok

Now, if there is 1 or more jobs then an accurate result is provided without any issues.
However, if there are no Job pages with "Customer Service" selected as an option in the job_department attribute for it, then instead of returning 0 results like it should, it returns ALL results as if that filter was never applied.

This is not how I would expect it to work as I am asking it to explicitly filter down to whatever matches, when doing the same on a text field, or any other attribute type it works as expected, but just not on Select types.


Status: New
pixelhero

concrete5 Environment Information

# concrete5 Version
Core Version - 8.5.2
Version Installed - 8.5.2
Database Version - 20190925072210

# Database Information
Version: 10.3.21-MariaDB-1:10.3.21+maria~stretch-log
SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

# concrete5 Packages
Block Designer (2.8.2), Block Designer Pro (2.8.4)

# concrete5 Overrides
blocks/social_home_new/add.php, blocks/social_home_new/view.php, blocks/social_home_new/composer.php, blocks/social_home_new/icon.png, blocks/social_home_new/config.json, blocks/social_home_new/edit.php, blocks/social_home_new/db.xml, blocks/social_home_new/form.php, blocks/social_home_new/controller.php, blocks/social_home_new, blocks/latest_jobs/add.php, blocks/latest_jobs/view.php, blocks/latest_jobs/composer.php, blocks/latest_jobs/icon.png, blocks/latest_jobs/config.json, blocks/latest_jobs/edit.php, blocks/latest_jobs/auto.js, blocks/latest_jobs/db.xml, blocks/latest_jobs/form.php, blocks/latest_jobs/controller.php, blocks/latest_jobs, blocks/featured_job/add.php, blocks/featured_job/view.php, blocks/featured_job/composer.php, blocks/featured_job/icon.png, blocks/featured_job/config.json, blocks/featured_job/edit.php, blocks/featured_job/auto.js, blocks/featured_job/db.xml, blocks/featured_job/form.php, blocks/featured_job/controller.php, blocks/featured_job, blocks/date_navigation/templates/cols.php, blocks/date_navigation/templates, blocks/date_navigation, blocks/glassdoor_indeed/add.php, blocks/glassdoor_indeed/view.php, blocks/glassdoor_indeed/composer.php, blocks/glassdoor_indeed/icon.png, blocks/glassdoor_indeed/config.json, blocks/glassdoor_indeed/edit.php, blocks/glassdoor_indeed/auto.js, blocks/glassdoor_indeed/css_form/repeatable-ft.form.css, blocks/glassdoor_indeed/css_form, blocks/glassdoor_indeed/db.xml, blocks/glassdoor_indeed/js_form/handlebars-helpers.js, blocks/glassdoor_indeed/js_form/handlebars-v4.0.4.js, blocks/glassdoor_indeed/js_form, blocks/glassdoor_indeed/form.php, blocks/glassdoor_indeed/controller.php, blocks/glassdoor_indeed, blocks/repeater/add.php, blocks/repeater/templates/blue_50.php, blocks/repeater/templates/side_questions.php, blocks/repeater/templates/footer_links.php, blocks/repeater/templates/benefits.php, blocks/repeater/templates/grey_yellow_slider.php, blocks/repeater/templates/headed_grid.php, blocks/repeater/templates/ready_apply.php, blocks/repeater/templates/grey_blue_slider_r.php, blocks/repeater/templates/footer_links_white.php, blocks/repeater/templates/odd_slider.php, blocks/repeater/templates/route.php, blocks/repeater/templates/grey_blue_slider.php, blocks/repeater/templates/pay.php, blocks/repeater/templates/steps.php, blocks/repeater/templates/odd_slider_r.php, blocks/repeater/templates/numbers.php, blocks/repeater/templates/map.php, blocks/repeater/templates/simple-white-box.php, blocks/repeater/templates/icon_slider.php, blocks/repeater/templates/meet.php, blocks/repeater/templates/day_in_life.php, blocks/repeater/templates/grey_blue_slider_rr.php, blocks/repeater/templates, blocks/repeater/view.php, blocks/repeater/composer.php, blocks/repeater/icon.png, blocks/repeater/config.json, blocks/repeater/edit.php, blocks/repeater/auto.js, blocks/repeater/css_form/repeatable-ft.form.css, blocks/repeater/css_form, blocks/repeater/db.xml, blocks/repeater/js_form/handlebars-helpers.js, blocks/repeater/js_form/handlebars-v4.0.4.js, blocks/repeater/js_form, blocks/repeater/form.php, blocks/repeater/controller.php, blocks/repeater, blocks/hero_new/add.php, blocks/hero_new/templates/home.php, blocks/hero_new/templates, blocks/hero_new/view.php, blocks/hero_new/composer.php, blocks/hero_new/icon.png, blocks/hero_new/config.json, blocks/hero_new/edit.php, blocks/hero_new/auto.js, blocks/hero_new/db.xml, blocks/hero_new/form.php, blocks/hero_new/controller.php, blocks/hero_new, blocks/content/templates/footer_links.php, blocks/content/templates/narrow.php, blocks/content/templates, blocks/content, blocks/topic_list/templates/blog_post.php, blocks/topic_list/templates/flat_filter.php, blocks/topic_list/templates/blog_home.php, blocks/topic_list/templates, blocks/topic_list, blocks/page_list/templates/all_blogs.php, blocks/page_list/templates/job_search.php, blocks/page_list/templates/latest_jobs.php, blocks/page_list/templates/dept_blogs.php, blocks/page_list/templates/latest_jobs_dept.php, blocks/page_list/templates/page_links.php, blocks/page_list/templates/find_place.php, blocks/page_list/templates, blocks/page_list, controllers/SearchCache.php, jobs/job_import.php, jobs/search_cache.php, themes/tla/news.php, themes/tla/elements/header_top.php, themes/tla/elements/footer.php, themes/tla/elements/footer_bottom.php, themes/tla/elements/header.php, themes/tla/elements, themes/tla/page_theme.php, themes/tla/images/arrow-right--white.png, themes/tla/images/icon_download.png, themes/tla/images/bg-checks-blue.png, themes/tla/images/arrow-left.png, themes/tla/images/download_icon.png, themes/tla/images/arrow_hollow.png, themes/tla/images/glassdoor.png, themes/tla/images/bg-checks-off.png, themes/tla/images/bg-checks-side.png, themes/tla/images/button--arrow.png, themes/tla/images/arrow-right.png, themes/tla/images/bg-checks-yellow2.png, themes/tla/images/arrow-right--yellow.png, themes/tla/images/bg-checks-yellow.png, themes/tla/images/arrow-right--black.png, themes/tla/images/arrow-left--black.png, themes/tla/images/bg-news.png, themes/tla/images/indeed.png, themes/tla/images/arrow-left--white.png, themes/tla/images, themes/tla/thumbnail.png, themes/tla/full.php, themes/tla/fonts/fa-brands-400.woff2, themes/tla/fonts/fa-light-300.eot, themes/tla/fonts/fa-solid-900.woff2, themes/tla/fonts/fa-brands-400.eot, themes/tla/fonts/fa-regular-400.woff, themes/tla/fonts/fa-solid-900.ttf, themes/tla/fonts/fa-regular-400.woff2, themes/tla/fonts/fa-light-300.woff, themes/tla/fonts/fa-light-300.woff2, themes/tla/fonts/fa-regular-400.ttf, themes/tla/fonts/fa-light-300.ttf, themes/tla/fonts/fa-brands-400.woff, themes/tla/fonts/fa-regular-400.eot, themes/tla/fonts/fa-brands-400.ttf, themes/tla/fonts/fa-solid-900.woff, themes/tla/fonts/fa-solid-900.eot, themes/tla/fonts, themes/tla/job.php, themes/tla/css/bootstrap-modified.css, themes/tla/css/build/reset.less, themes/tla/css/build/header.less, themes/tla/css/build/bootstrap-3.4.0/modals.less, themes/tla/css/build/bootstrap-3.4.0/mixins/border-radius.less, themes/tla/css/build/bootstrap-3.4.0/mixins/background-variant.less, themes/tla/css/build/bootstrap-3.4.0/mixins/responsive-visibility.less, themes/tla/css/build/bootstrap-3.4.0/mixins/text-emphasis.less, themes/tla/css/build/bootstrap-3.4.0/mixins/clearfix.less, themes/tla/css/build/bootstrap-3.4.0/mixins/opacity.less, themes/tla/css/build/bootstrap-3.4.0/mixins/forms.less, themes/tla/css/build/bootstrap-3.4.0/mixins/grid-framework.less, themes/tla/css/build/bootstrap-3.4.0/mixins/pagination.less, themes/tla/css/build/bootstrap-3.4.0/mixins/tab-focus.less, themes/tla/css/build/bootstrap-3.4.0/mixins/grid.less, themes/tla/css/build/bootstrap-3.4.0/mixins/text-overflow.less, themes/tla/css/build/bootstrap-3.4.0/mixins/nav-vertical-align.less, themes/tla/css/build/bootstrap-3.4.0/mixins/hide-text.less, themes/tla/css/build/bootstrap-3.4.0/mixins/table-row.less, themes/tla/css/build/bootstrap-3.4.0/mixins/size.less, themes/tla/css/build/bootstrap-3.4.0/mixins/vendor-prefixes.less, themes/tla/css/build/bootstrap-3.4.0/mixins/resize.less, themes/tla/css/build/bootstrap-3.4.0/mixins/list-group.less, themes/tla/css/build/bootstrap-3.4.0/mixins/gradients.less, themes/tla/css/build/bootstrap-3.4.0/mixins/alerts.less, themes/tla/css/build/bootstrap-3.4.0/mixins/nav-divider.less, themes/tla/css/build/bootstrap-3.4.0/mixins/labels.less, themes/tla/css/build/bootstrap-3.4.0/mixins/reset-filter.less, themes/tla/css/build/bootstrap-3.4.0/mixins/reset-text.less, themes/tla/css/build/bootstrap-3.4.0/mixins/image.less, themes/tla/css/build/bootstrap-3.4.0/mixins/buttons.less, themes/tla/css/build/bootstrap-3.4.0/mixins/center-block.less, themes/tla/css/build/bootstrap-3.4.0/mixins/progress-bar.less, themes/tla/css/build/bootstrap-3.4.0/mixins/panels.less, themes/tla/css/build/bootstrap-3.4.0/mixins, themes/tla/css/build/bootstrap-3.4.0/type.less, themes/tla/css/build/bootstrap-3.4.0/carousel.less, themes/tla/css/build/bootstrap-3.4.0/dropdowns.less, themes/tla/css/build/bootstrap-3.4.0/popovers.less, themes/tla/css/build/bootstrap-3.4.0/tooltip.less, themes/tla/css/build/bootstrap-3.4.0/progress-bars.less, themes/tla/css/build/bootstrap-3.4.0/scaffolding.less, themes/tla/css/build/bootstrap-3.4.0/responsive-embed.less, themes/tla/css/build/bootstrap-3.4.0/forms.less, themes/tla/css/build/bootstrap-3.4.0/input-groups.less, themes/tla/css/build/bootstrap-3.4.0/pagination.less, themes/tla/css/build/bootstrap-3.4.0/bootstrap.less, themes/tla/css/build/bootstrap-3.4.0/grid.less, themes/tla/css/build/bootstrap-3.4.0/button-groups.less, themes/tla/css/build/bootstrap-3.4.0/thumbnails.less, themes/tla/css/build/bootstrap-3.4.0/code.less, themes/tla/css/build/bootstrap-3.4.0/mixins.less, themes/tla/css/build/bootstrap-3.4.0/list-group.less, themes/tla/css/build/bootstrap-3.4.0/navbar.less, themes/tla/css/build/bootstrap-3.4.0/glyphicons.less, themes/tla/css/build/bootstrap-3.4.0/breadcrumbs.less, themes/tla/css/build/bootstrap-3.4.0/pager.less, themes/tla/css/build/bootstrap-3.4.0/close.less, themes/tla/css/build/bootstrap-3.4.0/alerts.less, themes/tla/css/build/bootstrap-3.4.0/wells.less, themes/tla/css/build/bootstrap-3.4.0/navs.less, themes/tla/css/build/bootstrap-3.4.0/media.less, themes/tla/css/build/bootstrap-3.4.0/labels.less, themes/tla/css/build/bootstrap-3.4.0/jumbotron.less, themes/tla/css/build/bootstrap-3.4.0/print.less, themes/tla/css/build/bootstrap-3.4.0/utilities.less, themes/tla/css/build/bootstrap-3.4.0/component-animations.less, themes/tla/css/build/bootstrap-3.4.0/variables.less, themes/tla/css/build/bootstrap-3.4.0/buttons.less, themes/tla/css/build/bootstrap-3.4.0/normalize.less, themes/tla/css/build/bootstrap-3.4.0/responsive-utilities.less, themes/tla/css/build/bootstrap-3.4.0/theme.less, themes/tla/css/build/bootstrap-3.4.0/tables.less, themes/tla/css/build/bootstrap-3.4.0/panels.less, themes/tla/css/build/bootstrap-3.4.0/badges.less, themes/tla/css/build/bootstrap-3.4.0, themes/tla/css/build/footer.less, themes/tla/css/build/body.less, themes/tla/css/build, themes/tla/css/config.less, themes/tla/css/main.less, themes/tla/css, themes/tla/default.php, themes/tla/js/js.js, themes/tla/js, themes/tla/page_not_found.php, themes/tla/page_forbidden.php, themes/tla

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 1 minutes.

# Server Software
Apache/2.4.25 (Debian)

# Server API
fpm-fcgi

# PHP Version
5.6.40-15+0~20191218.25+debian9~1.gbp0eb140

# PHP Extensions
calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, intl, ionCube Loader, json, libxml, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, readline, Reflection, session, shmop, SimpleXML, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 8M
sql.safe_mode - Off
upload_max_filesize - 2M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
opcache.max_accelerated_files - 2000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36