← back to Designer Wallcoverings
shop-by-color: client-side href fix for 6 dead color-tab handles
bbf71b11e678e8a98094505bd463fdc544010d4d · 2026-07-09 08:06:13 -0700 · Steve
The /pages/shop-by-color page body links Blue/Yellow/Orange/Red/Grey/White to
404 collection handles (needs write_content scope to edit the page body, which
the admin token lacks). Path-scoped shim in footer.liquid rewrites the 6 dead
hrefs to valid handles on that page only; inert elsewhere. Remove once the page
body is corrected via content scope. Verified live: 16/16 tabs resolve, 0 dead.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
M shopify/theme-LIVE-591/sections/footer.liquid
Diff
commit bbf71b11e678e8a98094505bd463fdc544010d4d
Author: Steve <steve@designerwallcoverings.com>
Date: Thu Jul 9 08:06:13 2026 -0700
shop-by-color: client-side href fix for 6 dead color-tab handles
The /pages/shop-by-color page body links Blue/Yellow/Orange/Red/Grey/White to
404 collection handles (needs write_content scope to edit the page body, which
the admin token lacks). Path-scoped shim in footer.liquid rewrites the 6 dead
hrefs to valid handles on that page only; inert elsewhere. Remove once the page
body is corrected via content scope. Verified live: 16/16 tabs resolve, 0 dead.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
shopify/theme-LIVE-591/sections/footer.liquid | 34 +++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/shopify/theme-LIVE-591/sections/footer.liquid b/shopify/theme-LIVE-591/sections/footer.liquid
index adc5b1a2..e9861ce6 100644
--- a/shopify/theme-LIVE-591/sections/footer.liquid
+++ b/shopify/theme-LIVE-591/sections/footer.liquid
@@ -353,6 +353,40 @@
</footer>
+{%- comment -%}
+ Shop-by-Color tab handle fix (Steve 2026-07-09). The /pages/shop-by-color page
+ body links 6 color tiles to collection handles that 404 (a -wallcovering- vs
+ -wallpaper- naming mismatch). The page body needs write_content scope to edit
+ directly; until that lands, correct the 6 dead hrefs client-side on that page
+ ONLY. Inert on every other page. Remove once the page body is fixed.
+{%- endcomment -%}
+{%- if request.path contains '/pages/shop-by-color' -%}
+<script>
+(function(){
+ var FIX={
+ 'blue-wallpaper-collection':'blue-wallpaper',
+ 'yellow-wallcovering-collection':'yellow-wallpaper-collection',
+ 'orange-wallcovering-collection':'orange',
+ 'red-wallcovering-collection':'red-wallpaper-collection',
+ 'grey-wallcovering':'grey-silver',
+ 'white-wallcovering-collection':'white-wallpaper-collection'
+ };
+ function fixOne(a){
+ var h=a.getAttribute('href')||'';
+ for(var bad in FIX){
+ if(h.indexOf('/collections/'+bad)===0 || h==='/collections/'+bad){
+ a.setAttribute('href', h.replace('/collections/'+bad, '/collections/'+FIX[bad]));
+ if(a.dataset && a.dataset.handle===bad) a.dataset.handle=FIX[bad];
+ break;
+ }
+ }
+ }
+ function run(){ document.querySelectorAll('a[href*="/collections/"]').forEach(fixOne); }
+ if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',run);}else{run();}
+})();
+</script>
+{%- endif -%}
+
{% schema %}
{
"name": "Footer",
← a58a0782 auto-save: 2026-07-09T07:39:29 (3 files) — DW-Programming/Im
·
back to Designer Wallcoverings
·
auto-save: 2026-07-09T08:09:34 (7 files) — DW-Programming/Im 6c3ffae7 →