Error!

MySQL Error: Expression #1 of ORDER BY clause is not in SELECT list, references column 'rodpub_beta.p.priority' which is not in SELECT list; this is incompatible with DISTINCT
SQL Statement: SELECT distinct web_ads.id,location,code,type FROM web_ads JOIN web_ad_pages as p on p.ad_id=web_ads.id join web_ad_dates as d on d.ad_id=web_ads.id and d.start_date <= '2022-01-17' and d.end_date >= '2022-01-17' WHERE web_ads.magazine_id='5' and ((url = "/issues/2019-06-01/view_breaking-news/hempel-launches-new-antifouling-solution") or (url = "/contents/list_breaking-news") or (url = "/") or (url = "/") or (url = "/") or (url = "/") or (url = "/") or (url = "/") or (url = "/") or (url = "/") or (url = "/") or (url = "/") or (url = "/issues/2019-06-01/view_breaking-news/hempel-launches-new-antifouling-solution/7883") or (url = "whole-site")) ORDER BY priority desc