{"id":1334764,"date":"2010-01-07T12:30:58","date_gmt":"2010-01-07T12:30:58","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/colors-meta-css-src-boolean-generates-parse_url-errors-in-_css_href\/"},"modified":"2016-08-19T15:13:38","modified_gmt":"2016-08-19T15:13:38","slug":"colors-meta-css-src-boolean-generates-parse_url-errors-in-_css_href","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/colors-meta-css-src-boolean-generates-parse_url-errors-in-_css_href\/","title":{"rendered":"&#8216;colors&#8217; meta-css src (boolean) generates parse_url errors in _css_href"},"content":{"rendered":"<p>The admin color stylesheet is a meta stylesheet with the boolean <em>true<\/em> as the <em>src<\/em> value. This can lead to invalid urls in <em>Wp_Styles::_css_href<\/em> when the base url has a port number with 5 digits (10000 and above).<\/p>\n<p>In my case, the <em>home<\/em> and <em>siteurl<\/em> values are set to <em>http:\/\/localhost:45000\/<\/em> (the error occurs with and without a trailing slash, it seems this is stripped). Since the value of <em>src<\/em> is appended to the base url in <em>_css_href<\/em>, and a boolean <em>true<\/em> becomes <em>&#8216;1&#8217;<\/em> when appended to a string, this results in the src value <em>http:\/\/localhost:450001<\/em>, which leads to errors later in <em>wp_style_loader_src<\/em> when this temporary url is stripped (by <em>parse_url<\/em>) to create the actual url.<\/p>\n<p>My solution is to change the default <em>src<\/em> value of the meta <em>colors<\/em> stylesheet to <em>false<\/em> or <em>&#8216;\/&#8217;<\/em>, or some other harmless value.<\/p>\n","protected":false},"template":"","class_list":["post-1334764","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1334764","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1334764\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=1334764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}