SOLVED: Anonymous query loop on page

Browser: Chrome 139.0.7258.67
OS: Windows

Hi bricks team,

On a page I have two query loops which are nested. There are no orphan elements. But elements like pagination identify 3 query loops on the page.

{"content":[{"id":"8e82bb","name":"filter-checkbox","parent":"0fb85f","children":[],"settings":{"filterQueryId":"irnsoq","filterTaxonomy":"pa_color","filterHideEmpty":true,"filterNiceName":"category","filterSource":"taxonomy","_cssGlobalClasses":["gdgbmb"]},"themeStyles":[]},{"id":"5f45c4","name":"section","parent":0,"children":["b4bdba"],"settings":[]},{"id":"b4bdba","name":"container","parent":"5f45c4","children":["0fb85f","5814d4"],"settings":{"_direction":"row","_columnGap":"20"}},{"id":"0fb85f","name":"block","parent":"b4bdba","children":["pnwtkg","c14fe4","f85c83","1887ba","qepscj","8e82bb","znjbsq"],"settings":{"_width":"25%","_rowGap":"20","_border":{"width":{"top":"1","right":"1","bottom":"1","left":"1"},"style":"solid","color":{"hex":"#ebebeb","id":"zdbmmp","name":"border"}},"_padding":{"top":"20","right":"20","bottom":"20","left":"20"}},"label":"Left sidebar"},{"id":"5814d4","name":"block","parent":"b4bdba","children":["3533bb","8863a0","fff20b","55c034"],"settings":{"_width":"75%","_rowGap":"20"},"label":"Content"},{"id":"3533bb","name":"block","parent":"5814d4","children":["ggnagw","82ff8d"],"settings":{"_gridItemColumnSpan":"1 / 4","_justifyContent":"space-between","_alignItems":"center","_border":{"width":{"top":"1","right":"1","bottom":"1","left":"1"},"style":"solid","color":{"hex":"#ebebeb","id":"zdbmmp","name":"border"}},"_padding":{"top":"10","right":"10","bottom":"10","left":"10"},"_direction":"row"},"label":"Header"},{"id":"82ff8d","name":"filter-radio","parent":"3533bb","children":[],"settings":{"filterQueryId":"irnsoq","filterSource":"customField","filterAction":"sort","sortOptions":[{"id":"pqikec","optionLabel":"newest","optionSource":"date","optionOrder":"DESC"},{"id":"fjwejp","optionLabel":"cheapest","optionSource":"meta_value","optionMetaKey":"_price","optionOrder":"ASC"},{"id":"tyiasc","optionLabel":"expensive","optionSource":"meta_value","optionMetaKey":"_price","optionOrder":"DESC"},{"id":"nrlluc","optionLabel":"top sales","optionSource":"meta_value_num","optionMetaKey":"total_sales","optionOrder":"DESC"}],"buttonActiveTypography":{"color":{"hex":"#ffffff"}},"buttonBackgroundColor":{"hex":"#f9f9f9","id":"zirxzi","name":"background 1"},"buttonTypography":{"color":{"hex":"#0c0c0d","id":"eqqjwf","name":"text 1"}},"buttonActiveBackgroundColor":{"hex":"#0c0c0d","id":"eqqjwf","name":"text 1"},"displayMode":"button","filterNiceName":"sort","filterApplyOn":"change"},"themeStyles":[]},{"id":"f85c83","name":"filter-range","parent":"0fb85f","children":[],"settings":{"filterQueryId":"irnsoq","filterSource":"customField","customFieldKey":"_price","labelThousandSeparator":true,"placeholderMin":"از","placeholderMax":"تا","labelMax":"to","labelMin":"from","sliderBarColorActive":{"hex":"#079edb","id":"iwzhso","name":"site color"},"sliderBarColor":{"hex":"#07db00","id":"kfgqmx","name":"Green"},"sliderThumbColor":{"hex":"#0c0c0d","id":"eqqjwf","name":"text 1"},"sliderThumbSize":"20","sliderThumbBorder":"2","labelGap":"5","filterNiceName":"price"},"themeStyles":[]},{"id":"c14fe4","name":"filter-search","parent":"0fb85f","children":[],"settings":{"filterQueryId":"irnsoq","_padding":{"top":"5","bottom":"5"},"icon":{"library":"themify","icon":"ti-close"},"filterNiceName":"search","_background":{"color":{"hex":"#f9f9f9","id":"zirxzi","name":"background 1"}},"_border":{"color":{"hex":"#ebebeb","id":"zdbmmp","name":"border"}},"filterInputDebounce":"0","filterMinChars":"1"},"themeStyles":[]},{"id":"55c034","name":"pagination","parent":"5814d4","children":[],"settings":{"navigationHeight":"50","navigationWidth":"50","navigationBorder":{"width":{"top":"1","right":"1","bottom":"1","left":"1"},"style":"solid","color":{"hex":"#ebebeb","id":"zdbmmp","name":"border"}},"navigationBackgroundActive":{"hex":"#1f2328","id":"ligytl","name":"Text 1"},"navigationTypographyActive":{"color":{"hex":"#ffffff"}},"navigationBorderActive":{"color":{"hex":"#1f2328","id":"ligytl","name":"Text 1"}},"midSize":"1","ajax":true,"_interactions":[{"id":"fesnae","trigger":"ajaxStart","ajaxQueryId":"irnsoq","action":"show","targetSelector":"#brx-content","scrollToDelay":"500","scrollToOffset":"100","target":"popup","templateId":"2613"},{"id":"sfirqe","trigger":"ajaxEnd","ajaxQueryId":"irnsoq","action":"hide","targetSelector":"#brx-content","scrollToDelay":"500","scrollToOffset":"100","target":"popup","templateId":"2613"},{"id":"dnrtvk","trigger":"ajaxEnd","ajaxQueryId":"irnsoq","action":"scrollTo","target":"custom","targetSelector":"#brx-header","scrollToDelay":"500"}],"gap":"10","prevIcon":{"library":"themify","icon":"ti-arrow-left"},"nextIcon":{"library":"themify","icon":"ti-arrow-right"},"queryId":"irnsoq"},"themeStyles":[]},{"id":"fff20b","name":"block","parent":"5814d4","children":["irnsoq"],"settings":{"_display":"grid","_gridTemplateColumns":"1fr 1fr 1fr"},"label":"Loop Grid"},{"id":"1887ba","name":"filter-select","parent":"0fb85f","children":[],"settings":{"filterQueryId":"irnsoq","filterNiceName":"ccategory","filterTaxonomy":"product_cat","filterLabelAll":"All types","filterSource":"taxonomy"},"themeStyles":[]},{"id":"e32439","name":"filter-submit","parent":"pnwtkg","children":[],"settings":{"text":"Clear all","filterQueryId":"irnsoq","filterButtonType":"reset","hideOnNoFilter":true,"_padding":{"top":"0","right":"0","bottom":"0","left":"0"},"_background":{"color":{"hex":"#ffffff"}},"direction":"row-reverse","gap":"5"},"themeStyles":[],"label":"Filter - Reset"},{"id":"ggnagw","name":"query-results-summary","parent":"3533bb","children":[],"settings":{"queryId":"irnsoq","statsFormat":"%start% - %end% of %total% Product"},"themeStyles":[]},{"id":"8863a0","name":"filter-active-filters","parent":"5814d4","children":[],"settings":{"filterQueryId":"irnsoq","icon":{"height":"15","width":"15","library":"custom_set_hbu7vqm9q","svg":{"id":1783,"icon_id":"icon_95c7a8dfu","url":"https://avangtheme.ir/wp-content/uploads/2025/02/close.svg"}},"iconGap":"5","buttonBackgroundColor":{"hex":"#f9f9f9","id":"zirxzi","name":"background 1"}},"themeStyles":[]},{"id":"sodmpn","name":"filter-radio","parent":"qepscj","children":[],"settings":{"filterQueryId":"irnsoq","filterNiceName":"sale","displayMode":"button","filterSource":"wcField","wcField":"wcOnSale","filterHideAllOption":true,"wcHideNotOnSale":true,"buttonBackgroundColor":{"hex":"#f8f8f8","id":"cafrcf","name":"Background"},"buttonTypography":{"color":{"hex":"#1f2328","id":"ligytl","name":"Text 1"}},"buttonBorder":{"width":{"top":"1","bottom":"1","right":"1","left":"1"},"style":"solid","color":{"hex":"#ebebeb","id":"wgebmr","name":"Border"}},"buttonActiveBackgroundColor":{"hex":"#1f2328","id":"ligytl","name":"Text 1"},"buttonActiveBorder":{"color":{"hex":"#1f2328","id":"ligytl","name":"Text 1"}},"buttonActiveTypography":{"color":{"hex":"#ffffff"}}},"themeStyles":[]},{"id":"ixxutb","name":"filter-radio","parent":"qepscj","children":[],"settings":{"filterQueryId":"irnsoq","filterNiceName":"sale","displayMode":"button","filterSource":"wcField","wcField":"wcInStock","filterHideAllOption":true,"wcHideNotOnSale":true,"buttonBackgroundColor":{"hex":"#f8f8f8","id":"cafrcf","name":"Background"},"buttonTypography":{"color":{"hex":"#1f2328","id":"ligytl","name":"Text 1"}},"buttonBorder":{"width":{"top":"1","bottom":"1","right":"1","left":"1"},"style":"solid","color":{"hex":"#ebebeb","id":"wgebmr","name":"Border"}},"buttonActiveBackgroundColor":{"hex":"#1f2328","id":"ligytl","name":"Text 1"},"buttonActiveBorder":{"color":{"hex":"#1f2328","id":"ligytl","name":"Text 1"}},"buttonActiveTypography":{"color":{"hex":"#ffffff"}},"wcHideOutOfStock":true},"themeStyles":[]},{"id":"qepscj","name":"div","parent":"0fb85f","children":["ixxutb","sodmpn"],"settings":{"_columnGap":"10","_rowGap":"10"}},{"id":"znjbsq","name":"filter-radio","parent":"0fb85f","children":[],"settings":{"filterQueryId":"irnsoq","filterAction":"filter","filterSource":"taxonomy","filterTaxonomy":"product_cat","_cssGlobalClasses":["gdgbmb"]}},{"id":"irnsoq","name":"block","parent":"fff20b","children":["qmmvxe","ffbhot","kmkgrp","emgrql","pnlhpe","gczfue"],"settings":{"_border":{"width":{"right":"1","bottom":"1"},"style":"solid","color":{"hex":"#ebebeb","id":"wgebmr","name":"Border"}},"_padding":{"top":"15","right":"15","bottom":"15","left":"15"},"_position":"relative","_rowGap":"10","hasLoop":true,"_alignItems":"flex-start","_justifyContent":"flex-start","tag":"a","link":{"type":"external","url":"{post_url}"},"query":{"post_type":["product"],"orderby":["meta_value","date"],"meta_key":"_stock_status","order":["asc","desc"],"posts_per_page":"9"}},"properties":{"woynka":{"post_type":["product"],"orderby":["meta_value","date"],"meta_key":"_stock_status","order":["asc","desc"],"posts_per_page":"9"}},"label":"Product card","selectors":[{"id":"kpizbw","selector":":nth-child(3n+3)","settings":{"_border":{"width":{"right":"0"}}},"label":"Left side"},{"id":"gpswlj","selector":":nth-child(n+7)","settings":{"_border":{"width":{"bottom":"0"}}},"label":"End list"}]},{"id":"pnwtkg","name":"block","parent":"0fb85f","children":["larsnl","e32439"],"settings":{"_direction":"row","_justifyContent":"space-between","_alignItems":"center"}},{"id":"larsnl","name":"heading","parent":"pnwtkg","children":[],"settings":{"text":"Filters"}},{"id":"chbzea","name":"image","parent":"irnsoq","children":[],"settings":{"url":{"type":"meta","useDynamicData":"{post_url}"},"image":{"useDynamicData":"{featured_image}","size":"large"}},"label":"Product image"},{"id":"kwyxcw","name":"text-basic","parent":"irnsoq","children":[],"settings":{"_background":{"color":{"hex":"#d12b2b","id":"uumtly","name":"Red"}},"tag":"span","_padding":{"top":"5","right":"10","bottom":"5","left":"10"},"_typography":{"font-size":"12","color":{"hex":"#ffffff"},"font-weight":"700"},"_conditions":[[{"id":"ekrxcw","key":"woo_product_sale","compare":"==","value":"1"}]],"_right":"30","_top":"30","_position":"absolute","text":"Sale!"},"label":"Sale Badge"},{"id":"nkzgyp","name":"div","parent":"irnsoq","children":["qowviq","oskaiq"],"settings":{"_conditions":[[{"id":"ezclkz","key":"woo_product_stock_status","value":"instock","compare":"=="}]],"_direction":"row","_columnGap":"5","_alignItems":"center"},"label":"Swatches"},{"id":"qowviq","name":"div","parent":"nkzgyp","children":[],"settings":{"query":{"objectType":"term","taxonomy":["pa_color"],"number":"3","disable_query_merge":true,"current_post_term":true},"_widthMin":"15","customTag":"span","_heightMin":"15","_attributes":[{"id":"cjiobr","name":"style","value":"background-color:{term_meta:bricks_swatch_color_value}"}],"_border":{"radius":{"top":"50vw","right":"50vw","bottom":"50vw","left":"50vw"}},"hasLoop":true,"tag":"custom"},"label":"Color"},{"id":"oskaiq","name":"icon","parent":"nkzgyp","children":[],"settings":{"icon":{"library":"custom_set_hbu7vqm9q","svg":{"id":4227,"icon_id":"icon_yaa9fhba6","url":"https://avangtheme.ir/wp-content/uploads/2025/04/positive.svg"},"height":"10","width":"10","fill":{"hex":"#1f2328","id":"ligytl","name":"Text 1"}},"_conditions":[[{"id":"svmnyc","key":"dynamic_data","dynamic_data":"{query_results_count:nasinc-bfhubu}","compare":">","value":"3"}]]},"label":"More"},{"id":"sfdtky","name":"heading","parent":"irnsoq","children":[],"settings":{"text":"{post_title}"},"label":"Product title"},{"id":"yjeyed","name":"text-basic","parent":"irnsoq","children":[],"settings":{"_conditions":[[{"id":"yfztya","key":"woo_product_stock_status","compare":"!=","value":"instock"}]],"text":"Out of stock","tag":"span","_typography":{"color":{"hex":"#ff2e2e","id":"uumtly","name":"Red"},"font-weight":"700","font-size":"16"}},"label":"Out of stock badge"},{"id":"hsljtk","name":"product-price","parent":"irnsoq","children":[],"settings":{"_conditions":[[{"id":"bumvyi","key":"woo_product_stock_status","compare":"==","value":"instock"}]],"regularPriceTypography":{"color":{"hex":"#59636e","id":"qscmex","name":"Text 2"}},"salePriceTypography":{"color":{"hex":"#1f2328","id":"ligytl","name":"Text 1"}}}},{"id":"qmmvxe","name":"image","parent":"irnsoq","children":[],"settings":{"url":{"type":"meta","useDynamicData":"{post_url}"},"image":{"useDynamicData":"{featured_image}","size":"large"}},"label":"Product image"},{"id":"ffbhot","name":"text-basic","parent":"irnsoq","children":[],"settings":{"_background":{"color":{"hex":"#d12b2b","id":"uumtly","name":"Red"}},"tag":"span","_padding":{"top":"5","right":"10","bottom":"5","left":"10"},"_typography":{"font-size":"12","color":{"hex":"#ffffff"},"font-weight":"700"},"_conditions":[[{"id":"ekrxcw","key":"woo_product_sale","compare":"==","value":"1"}]],"_right":"30","_top":"30","_position":"absolute","text":"Sale!"},"label":"Sale Badge"},{"id":"kmkgrp","name":"div","parent":"irnsoq","children":["lnjllx","szalny"],"settings":{"_conditions":[[{"id":"ezclkz","key":"woo_product_stock_status","value":"instock","compare":"=="}]],"_direction":"row","_columnGap":"5","_alignItems":"center"},"label":"Swatches","selectors":[{"id":"kfmums","selector":"[style*=\"background-color:#ffffff\"]","settings":{"_boxShadow":{"values":{"blur":"2"},"color":{"hex":"#000000","rgb":"rgba(0, 0, 0, 0.2)","hsl":"hsla(0, 0%, 0%, 0.2)"},"inset":true}},"label":"White color"}]},{"id":"lnjllx","name":"div","parent":"kmkgrp","children":[],"settings":{"query":{"objectType":"term","taxonomy":["pa_color"],"number":"3","disable_query_merge":true,"current_post_term":true},"_widthMin":"15","customTag":"span","_heightMin":"15","_attributes":[{"id":"cjiobr","name":"style","value":"background-color:{term_meta:bricks_swatch_color_value}"}],"_border":{"radius":{"top":"50vw","right":"50vw","bottom":"50vw","left":"50vw"}},"hasLoop":true,"tag":"custom"},"label":"Color"},{"id":"szalny","name":"icon","parent":"kmkgrp","children":[],"settings":{"icon":{"library":"custom_set_hbu7vqm9q","svg":{"id":4227,"icon_id":"icon_yaa9fhba6","url":"https://avangtheme.ir/wp-content/uploads/2025/04/positive.svg"},"height":"10","width":"10","fill":{"hex":"#1f2328","id":"ligytl","name":"Text 1"}},"_conditions":[[{"id":"svmnyc","key":"dynamic_data","dynamic_data":"{query_results_count:nasinc-bfhubu}","compare":">","value":"3"}]]},"label":"More"},{"id":"emgrql","name":"heading","parent":"irnsoq","children":[],"settings":{"text":"{post_title}"},"label":"Product title"},{"id":"pnlhpe","name":"text-basic","parent":"irnsoq","children":[],"settings":{"_conditions":[[{"id":"yfztya","key":"woo_product_stock_status","compare":"!=","value":"instock"}]],"text":"Out of stock","tag":"span","_typography":{"color":{"hex":"#ff2e2e","id":"uumtly","name":"Red"},"font-weight":"700","font-size":"16"}},"label":"Out of stock badge"},{"id":"gczfue","name":"product-price","parent":"irnsoq","children":[],"settings":{"_conditions":[[{"id":"bumvyi","key":"woo_product_stock_status","compare":"==","value":"instock"}]],"regularPriceTypography":{"color":{"hex":"#59636e","id":"qscmex","name":"Text 2"}},"salePriceTypography":{"color":{"hex":"#1f2328","id":"ligytl","name":"Text 1"}}}}],"source":"bricksCopiedElements","sourceUrl":"https://avangtheme.ir","version":"2.0.1","globalClasses":[{"id":"gdgbmb","name":"filters","settings":{"_width":"100%","_display":"flex","_flexDirection":"column","_gap":"10"},"selectors":[{"id":"qpionl","selector":".brx-option-text","settings":{"_width":"100%"},"label":"Width"},{"id":"kyltmp","selector":".brx-option-count","settings":{"_margin":{"left":"auto"}},"label":"Count"},{"id":"mgryvh","selector":"input","settings":{"_width":"20","_height":"20"},"label":"Input size"}],"modified":1754915922,"user_id":1}],"globalElements":[]}

Hi @HOSEIN,

thank you so much for this. It looks like there are orphaned elements, but they are not detected. If you check your JSON, you will notice that there are two elements with “Color” label, but only one is visible on the structure.

I’ve created an internal bug report about this one.

Thank you,
Matej

Hi Matej,

Thanks for the review. Interesting, so it’s possible that orphaned elements still exist but aren’t recognized by Bricks, right? But very rare.

Looks like it’s possible, yes. But we have to investigate to really see what is going on and why they are not detected - and then update our code accordingly. Do you maybe know what you were lastly doing on this page, before you noticed the issue?

Matej

I remember that I just removed the previous loop query which was not a component and added the loop item component. Then I unlink it.

The interesting thing here is that, unlike other similar cases, if I copy the entire page content and paste it into another page, the orphaned element still doesn’t appear.

I will investigate more closely and will definitely let you know if I come to any conclusions.

Hi Matej,

I realized that this report has a direct relationship to this one.

Here’s the key point: after unlinking the component, the orphaned element is there, but when you save, Bricks doesn’t detect it. As soon as you delete the component, Bricks now detects and removes it. So I think there is no need to worry.

Hi @HOSEIN,

thank you for additional info.:v: I’ve added this additional information to the task, so we will have it there once we work on it.
If it’s the same issue, then it will be solved once we solve the other one.

Thank you,
Matej

Hey @HOSEIN,

Can you still replicate this one? I am not concerned about the duplicated color elements inside the dropdown, as there are two color element query loops, but one is orphaned. If you copy and paste this structure onto your page and then save, does the orphan element check become visible?

For me, as soon as I save now, which is different from when it was first reported, I can see the orphan element notice. I can then clear it, and the problem is solved. Please let me know if this is also your experience. If it is, it is not a bug anymore. If you still see the issue, I will need a way to replicate it because I cannot reproduce it anymore.

Thank you,
Matej

Hi Matej,

Yes, you are right. It seems the problem is solved

Thank you

Hey @HOSEIN,

Thank you for the confirmation. I marked it as solved because it appears to have been resolved along the way, and I closed the internal task.

Thank you again,
Matej