Closed grasdaggel closed 7 years ago
You can achieve the very same result with the following:
<referenceContainer name="sidebar.main">
<block class="Magento\Cms\Block\Block" name="right.permanent.callout">
<arguments>
<argument name="block_id" xsi:type="string">your-block-identifier</argument>
</arguments>
</block>
</referenceContainer>
your-block-identifier
to the block you've created before7 days, not even noticed until now. Is anyone there?
If you're looking for a quick advice, you've come to the wrong place. Things move rather slow out here. Even if your issue gets reproduced and fixed, it'll take approximately 2 months minimum for the fix to reach a release version. I'd suggest that you describe your desired result on http://magento.stackexchange.com/ (and code you have and then you just might get a that the condition you enter for the "List of catalog products" is used to filter exactly those catalog products, and products don't have a property or attribute called "page_layout".
But, nevertheless, the Exception is indeed symptomatic of a bug, I'd expect such an invalid value to get filtered by Magento. Were you inserting the condition via the visual constructor (or manually the widget code after creating widget)?
I don't look for quick advice. This is clearly a bug as Magento2 shouldn't allow configurations that trigger hard SQL exceptions. As you can see I've already gave myself a "quick solution", so I don't really need a solution for that.
I used CMS blocks to inject and create the widget.
Ah so the "You can achieve the very same result" meant a workaround, not a second way to reproduce the issue? Sorry, I misunderstood. In that case, I'd suggest that you comprise a less ambiguous and easier to follow list of steps to reproduce. Personally, I got lost at step 6. Could you please provide the raw widget code you had inside your page's content in the end or a screenshot of it's condition? I think that would aid reproducing it (bugs that cannot be consistently reproduced on a clean installation don't even seem to reach the developers at Magento Inc. these days).
On a sidenote, I consider the custom design layouts utterly unpleasant to use in development due to the limitations they have. A possibility to target a specific CMS page (or a set of pages, categories etc.) from a fully functional layout .xml file (i.e. via a handle including its identifier or via an <update>
tag in custom design layout) imho would save a lot of nerves in comparison.
That way, you could track and deploy the changes done to this file via git, otherwise it's always the same dialog: "it's not working on my machine - oh, I forgot to tell you; you need to do some changes in admin".
Im sorry, I do not have the widget raw code anymore. Maybe I can re-create it somehow, but more or less Step 6 is meant to "Save the widget initially and then re-edit it". Then you have the possibility to go to "Options". Adding a screenshot seems very useful to me so I'm about to reproduce it and make a better list to reproduce the error. :) Thanks for your constructive input so far!
Also, I've edited my first answer to make it more clear that this is a workaround and not a way to reproduce the bug. Thanks for that hint!
@grasdaggel, thank you for your report. We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue. We tested the issue on 2.3.0-dev, 2.2.0, 2.1.9
What happened? Is this already implemented?
Preconditions
Steps to reproduce
Expected result
Actual result
Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.page_layout' in 'where clause', query was: SELECT COUNT(DISTINCT e.entity_id) FROM
catalog_product_flat_1
ASe
INNER JOINcatalog_category_product_index
AScat_index
ON cat_index.product_id=e.entity_id AND cat_index.store_id='1' AND cat_index.visibility IN(2, 4) AND cat_index.category_id='2' INNER JOINcatalog_product_index_price
ASprice_index
ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0 WHERE (((IFNULL(e
.page_layout
, 0) = '2columns-right') ))