-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown column 'at_special_from_date_default.value' in 'on clause' #309
Comments
what version of magento? Best |
Sorry I forgot this Magento 2.1.4 |
ok thanks, i will test it and back to you |
sorry about the delay, we are working in new releases of both m4m1 and m4m2 these days Best |
Hi gonzaloebiz |
OK, let me know. Best |
I have tried something else. |
you can modify this line https://github.com/ebizmarts/mailchimp-lib/blob/master/src/Mailchimp.php#L222 throw new Mailchimp_Error($result['title'].' : '.$result['detail'].' url: '.$this->_root.$url); We has an issue with the promo codes, but was fixed in 1.0.29 version, so i recommend update the extension Best |
Tonight I'm going to update but I want to install clean. |
Well, if you delete all the mailchimp tables, a lot of errors will appear (basically already exists errors) |
Hi |
you already make the change in the lib? if yes, take a look at the cron_schedule table |
Change done |
After the change in the log I have many errors The requested resource could not be found. url: https://us10.api.mailchimp.com/3.0/ecommerce/stores/de4e62f47aac5af43e3793e4b0aa1c7a This is the strange thing. I have deleted all but one and still making requests to stores that do not exist anymore. If you create a store in Magento it is created without problems in Mailchimp (checked using the api). This point OK Could it be that it is not possible to have a storeview connected to Mailchimp? Because the first storeview connects well but the second one seems not to. |
do you found this MailChimp store in the core_config_data table? Best |
Hi @antoniogarcia78 , Versions:
|
This SQL is in the class Product (Product.php) |
Hi, you can view the query here https://github.com/mailchimp/mc-magento2/blob/develop/Model/Api/Product.php#L159-L208 Best |
Vanilla vs My Magento (both 2.14)
|
i see this as well 2.2.4 at_special_from_date_default doesn't exist. |
are you already check the definition of the attributes? |
Hi, |
@gonzaloebiz Magento version 2.1.9 It occurred after I upgraded mailchimp/mc-magento2 version from 1.0.25 to 1.0.28 I applied changes from Anything you can suggest me here? This issue has been troubling me for days. |
To all with this issue, as the tags shows, we can't replicate the issue and we can't resolve it if we can't replicate. Best |
aplazame/aplazame-api-sdk v0.2.2 Aplazame API SDK |
At this point it would be best to uninstall the plugin completely and perform a clean installation (code and database) Is there a complete guide to uninstall the plugin? Thank you very much |
@antoniogarcia78 I have the same problem. I looked at your module-list and the only module that is on my installation is: magepal/magento2-googletagmanager 2.2.4 Google Tag Manager (GTM) for Magento 2 with Advance Data Layer Maybe this module is causing the error..?? |
Hi guys, I got a temporary solution for it and maybe someone else can make it better in the future. I will show my solution first and then explain the probable reason then. I know I am lazy and just change the original code and even don't want to create another custom model to overwrite it :P. You can do that if you want. Now I will explain what I found: When magento uses "$collection->addAttributeToFilter" to left join an attribute's values from a table to a sql query, it seems try to create a default view like "at_special_from_date_default" to keep its store_id=0 values, and then creates another one like "at_special_from_date" to keep its store_id=x values. But it doesn't create "at_special_from_date_default" for my website and saves all store_id=0 values to "at_special_from_date". However, Ebizmarts assumes all of our websites have created both of them here, so the exception comes up then. In my case, I don't know why my website doesn't use store_id=1 values for special_from_date. But I guess using stroe=0 values is fine to me because I only have one Website View and one Store, and all values for store=1 and =0 are the same. Anyway, it is not relevant to the attribute scope or default value because I have tested them. Maybe someone else can explain it? And hopefully someone can fix that piece of String so it will concern if "at_special_from_date_default" has generated or not. |
I get the exact error on magento2.2.3 at my cron table. Any updates and solution for this except for duyang79 solution? |
Hi @PiroozMB do you have any more information to share and help to find the solution? Best |
duyang79 solution didn't work for me. SQLSTATE[42S22]: Column not found: 1054 Unknown column 'at_special_from_date.value' in 'on clause', query was: SELECT |
Please read the comments #309 (comment) and #309 (comment) Best |
Hi @PiroozMB, I don't think your issue is the same as ours. The column you couldn't find was 'at_special_from_date.value' instead 'at_special_from_date_default.value'. But I think you can use the same way like what we did to resolve it by your self: |
I get this error. Latest magento2, latest mailchimp plugin, latest lib SQLSTATE[42S22]: Column not found: 1054 Unknown column 'at_special_to_date_default.value' in 'on clause', query was: SELECT |
I had faced the same issue and it was resolved when I set the "Use Flat Catalog Product - NO" and "Use Flat Catalog Category - NO" from the stores -> configuration -> catalogue settings. |
I solved this problem. I put my whole code here for those who have this problem. Just open magento2/../mailchimp/mc-magento2/Model/Api/Product.php file and remove all the code, then copy and paste the below code instead and clear the cache. @mikehenze `<?php
namespace Ebizmarts\MailChimp\Model\Api; class Product
// $productSyncData = $this->_chimpSyncEcommerce->getByStoreIdType($mailchimpStoreId,$product->getId(),
// $parentIds = $product->getTypeInstance()->getParentIdsByChild($product->getId());
} |
Hi @girishtiwari thnks for your feedback, i will try if this is the cause. Best |
Hi @gonzaloebiz |
When using the new code from @PiroozMB i get this error: Resource Not Found for Api Call: https://us1.api.mailchimp.com/3.0/lists/XXXXXXX/interest-categories - The requested resource could not be found. |
Mailchimp errors show lots of these: |
@ mikehenze |
Yes i copied it correctly: |
@mikehenze |
@PiroozMB Orders after yesterday are syncing. Workable for me. |
* add counters for resume the cron activity mailchimp#361 * closes mailchimp#361 * closes mailchimp#361 * Move mailchimp_sales_model_service_quote_submit_after observer to frontend scope to avoid throwing cookie error on CLI * change version to 1.0.30 * closes mailchimp#357 * Update Ecommerce.php * Update Ecommerce.php * closes mailchimp#309 * closes mailchimp#309 * closes mailchimp#391 * closes mailchimp#388 * closes mailchimp#393 * changelog version 1.0.30 * mailchimp#361 * This fix sets price to 0 if it's NULL * closes mailchimp#404 * closes mailchimp#406 * closes mailchimp#409 * closes mailchimp#409 * Add condition to check if there is a special price (for cases when timing for special price is set but special price is NOT set) * Code improvements Remove unused code from previous commits * mailchimp#420 Fix filter when creating collection * closes mailchimp#420 Initialize total order count and total spent on 0 * add the block for the mailchimp combo mailchimp#423 * change the text field for mailchimp tag for a combo mailchimp#423 * add management for the mc combo mailchimp#423 * add name and type to the tag closes mailchimp#423
Versions installed
ebizmarts/mailchimp-lib 3.0.21
mailchimp/mc-magento2 1.0.28
Problem: In cron_schedule and /var/www/var/log/magento.cron.log a lot de errors
SELECT
e
., IF(at_special_price.value_id > 0, at_special_price.value, at_special_price_default.value) ASspecial_price
,at_special_from_date
.value
ASspecial_from_date
,at_special_to_date
.value
ASspecial_to_date
,mc
. FROMcatalog_product_entity
ASe
LEFT JOIN
catalog_product_entity_decimal
ASat_special_price_default
ON (
at_special_price_default
.entity_id
=e
.entity_id
) AND (at_special_price_default
.attribute_id
= '567') ANDat_special_price_default
.store_id
= 0LEFT JOIN
catalog_product_entity_decimal
ASat_special_price
ON (
at_special_price
.entity_id
=e
.entity_id
) AND (at_special_price
.attribute_id
= '567') AND (at_special_price
.store_id
= 7)LEFT JOIN
catalog_product_entity_datetime
ASat_special_from_date
ON (
at_special_from_date
.entity_id
=e
.entity_id
)AND (
at_special_from_date
.attribute_id
= '568')AND (
at_special_from_date
.store_id
= 0)LEFT JOIN
catalog_product_entity_datetime
ASat_special_to_date
ON (
at_special_to_date
.entity_id
=e
.entity_id
)AND (
at_special_to_date
.attribute_id
= '569')AND (
at_special_to_date
.store_id
= 0)LEFT JOIN
mailchimp_sync_ecommerce
ASmc
ON mc.type = 'PRO'AND mc.related_id = e.entity_id
AND mc.mailchimp_sync_modified = 0
AND mc.mailchimp_store_id = '5cf8dfcd757d60254b1298e2bb26a2d3'
and mc.mailchimp_sync_delta < (IF(at_special_from_date.value_id > 0, at_special_from_date.value, at_special_from_date_default.value))
WHERE (IF(at_special_price.value_id > 0, at_special_price.value, at_special_price_default.value) > 0)
AND (((((at_special_from_date.value <= '2018-05-16 23:59:59') OR (at_special_from_date.value IS null)))))
AND (((((at_special_to_date.value >= '2018-05-16 00:00:00') OR (at_special_to_date.value IS null)))))
AND (mc.mailchimp_sync_delta is not null)
The problem is "Unknown column 'at_special_from_date_default.value' in 'on clause'"
I can't find this table (or alias)
We have not synchronized with Mailchimp for 3 weeks
The text was updated successfully, but these errors were encountered: