Skip to main content

I See, vendor/klarna/module-core/etc/db_schema.xml does not have store_id in the "column" tag But " $logs->addFieldToFilter('store_id', $store->getId());" in vendor/klarna/module-core/Cron/CleanLogs.php:141

I think this causes the error in cron jobs.

Created a patch file to resolve this issue

diff --git a/vendor/klarna/module-core/Cron/CleanLogs.php b/vendor/klarna/module-core/Cron/CleanLogs.php
 
index a2910a8..28f684c 100644
 
--- a/vendor/klarna/module-core/Cron/CleanLogs.php
 
+++ b/vendor/klarna/module-core/Cron/CleanLogs.php
 
@@ -138,7 +138,6 @@ class CleanLogs
 
         $lifetime *= self::SECONDSINDAY;

 

         $logs = $this->logCollectionFactory->create();
 
-        $logs->addFieldToFilter('store_id', $store->getId());
 
         $logs->addFieldToFilter('created_at', ['to' => date("Y-m-d", time() - $lifetime)]);

 

         return $logs; 

I See, vendor/klarna/module-core/etc/db_schema.xml does not have store_id in "column" tag But " $logs->addFieldToFilter('store_id', $store->getId());" in vendor/klarna/module-core/Cron/CleanLogs.php:141

I think this causes the error in cron jobs.

Created a patch file to resolve this issue

diff --git a/vendor/klarna/module-core/Cron/CleanLogs.php b/vendor/klarna/module-core/Cron/CleanLogs.php
 
index a2910a8..28f684c 100644
 
--- a/vendor/klarna/module-core/Cron/CleanLogs.php
 
+++ b/vendor/klarna/module-core/Cron/CleanLogs.php
 
@@ -138,7 +138,6 @@ class CleanLogs
 
         $lifetime *= self::SECONDSINDAY;

 

         $logs = $this->logCollectionFactory->create();
 
-        $logs->addFieldToFilter('store_id', $store->getId());
 
         $logs->addFieldToFilter('created_at', ['to' => date("Y-m-d", time() - $lifetime)]);

 

         return $logs;

I See, vendor/klarna/module-core/etc/db_schema.xml does not have store_id in the "column" tag But " $logs->addFieldToFilter('store_id', $store->getId());" in vendor/klarna/module-core/Cron/CleanLogs.php:141

I think this causes the error in cron jobs.

Created a patch file to resolve this issue

diff --git a/vendor/klarna/module-core/Cron/CleanLogs.php b/vendor/klarna/module-core/Cron/CleanLogs.php
index a2910a8..28f684c 100644
--- a/vendor/klarna/module-core/Cron/CleanLogs.php
+++ b/vendor/klarna/module-core/Cron/CleanLogs.php
@@ -138,7 +138,6 @@ class CleanLogs
         $lifetime *= self::SECONDSINDAY;

         $logs = $this->logCollectionFactory->create();
-        $logs->addFieldToFilter('store_id', $store->getId());
         $logs->addFieldToFilter('created_at', ['to' => date("Y-m-d", time() - $lifetime)]);

         return $logs; 

Source Link
Bejoy
  • 161
  • 5

I See, vendor/klarna/module-core/etc/db_schema.xml does not have store_id in "column" tag But " $logs->addFieldToFilter('store_id', $store->getId());" in vendor/klarna/module-core/Cron/CleanLogs.php:141

I think this causes the error in cron jobs.

Created a patch file to resolve this issue

diff --git a/vendor/klarna/module-core/Cron/CleanLogs.php b/vendor/klarna/module-core/Cron/CleanLogs.php

index a2910a8..28f684c 100644

--- a/vendor/klarna/module-core/Cron/CleanLogs.php

+++ b/vendor/klarna/module-core/Cron/CleanLogs.php

@@ -138,7 +138,6 @@ class CleanLogs

         $lifetime *= self::SECONDSINDAY;

 

         $logs = $this->logCollectionFactory->create();

-        $logs->addFieldToFilter('store_id', $store->getId());

         $logs->addFieldToFilter('created_at', ['to' => date("Y-m-d", time() - $lifetime)]);

 

         return $logs;