Email Address Export query_factory from 154db give white page in 156c
156c
php 7.3.20
maria 10.3.23
email address exporter gives white page in admin when query built in 154 is selected in 156c
another query for email address exporter functions as in the past
ADM debug log
Code:
[23-Jul-2020 10:45:19 America/Los_Angeles] Request URI: /adminfolderemail_export.php?action=save, IP address: xxx.yyy.zzz107
#1 mysqli_query() called at [/home/cpanel/public_html/includes/classes/db/mysql/query_factory.php:45]
#2 queryFactory->query() called at [/home/cpanel/public_html/includes/classes/db/mysql/query_factory.php:261]
#3 queryFactory->Execute() called at [/home/cpanel/public_html/adminfolderemail_export.php:89]
--> PHP Warning: mysqli_query(): Empty query in /home/cpanel/public_html/includes/classes/db/mysql/query_factory.php on line 45.
[23-Jul-2020 10:45:19 America/Los_Angeles] Request URI: /adminfolderemail_export.php?action=save, IP address: xxx.yyy.zzz107
#1 queryFactory->show_error() called at [/home/cpanel/public_html/includes/classes/db/mysql/query_factory.php:143]
#2 queryFactory->set_error() called at [/home/cpanel/public_html/includes/classes/db/mysql/query_factory.php:270]
#3 queryFactory->Execute() called at [/home/cpanel/public_html/adminfolderemail_export.php:89]
--> PHP Warning: Use of undefined constant DB_ERROR_NOT_CONNECTED - assumed 'DB_ERROR_NOT_CONNECTED' (this will throw an Error in a future version of PHP) in /home/cpanel/public_html/includes/classes/db/mysql/query_factory.php on line 152.
[23-Jul-2020 10:45:19 America/Los_Angeles] Request URI: /adminfolderemail_export.php?action=save, IP address: xxx.yyy.zzz107
#1 trigger_error() called at [/home/cpanel/public_html/includes/classes/db/mysql/query_factory.php:171]
#2 queryFactory->show_error() called at [/home/cpanel/public_html/includes/classes/db/mysql/query_factory.php:143]
#3 queryFactory->set_error() called at [/home/cpanel/public_html/includes/classes/db/mysql/query_factory.php:270]
#4 queryFactory->Execute() called at [/home/cpanel/public_html/adminfolderemail_export.php:89]
--> PHP Fatal error: 0: :: ==> (as called by) /home/cpanel/public_html/adminfolderemail_export.php on line 89 <== in /home/cpanel/public_html/includes/classes/db/mysql/query_factory.php on line 171.
from query_factory in db
query name:
Code:
Dormant Customers (>3months)(Order > $10 (Subscribers)
query description:
Code:
Subscribers who HAVE made a purchase over $10, but have NOT purchased for at least three months.
query string:
Code:
select o.date_purchased, c.customers_email_address, c.customers_lastname, c.customers_firstname from TABLE_CUSTOMERS c, TABLE_ORDERS o WHERE c.customers_id = o.customers_id AND
o.order_total > 10 AND
c.customers_newsletter = 1 GROUP BY c.customers_email_address HAVING max(o.date_purchased) <= subdate(now(),INTERVAL 3 MONTH) ORDER BY c.customers_lastname, c.customers_firstname ASC
Re: Email Address Export query_factory from 154db give white page in 156c
After investigation, it turns out that the root cause is the presence of a special character (>) in the query_builder table. Working with the team to figure out how to resolve.
Re: Email Address Export query_factory from 154db give white page in 156c
There were some other small bugs in the module that I fixed. DrByte is working out how to fix the issue with the Dormant Customers audience.
Re: Email Address Export query_factory from 154db give white page in 156c
Re: Email Address Export query_factory from 154db give white page in 156c
The fix for this issue that will be part of 1.5.7a is here:
https://github.com/zencart/zencart/pull/3988/files
You can apply this change to your own system at will; use Admin > Tools > Install SQL Patches and run
UPDATE query_builder SET query_name = 'Customers Dormant for 3+ months (Subscribers)' WHERE query_id = 3;
Re: Email Address Export query_factory from 154db give white page in 156c
Thank you. Fixed that query.
Following that example, replaced other queries which had a > symbol
Re: Email Address Export query_factory from 154db give white page in 156c
Quote:
Originally Posted by
RixStix
Thank you. Fixed that query.
Following that example, replaced other queries which had a > symbol
Hopefully you only touched the "query_name" field, and not the actual "query_string" where > symbol might be part of the actual query that needs to be run.
Re: Email Address Export query_factory from 154db give white page in 156c
Quote:
Originally Posted by
DrByte
Hopefully you only touched the "query_name" field, and not the actual "query_string" where > symbol might be part of the actual query that needs to be run.
Yes, that is what I did. Only touched the 'query_name' field.
Re: Email Address Export query_factory from 154db give white page in 156c
Quote:
Originally Posted by
RixStix
...
Following that example, replaced other queries which had a > symbol
Were these queries you added? Because only query #3 had that character in its name.
Re: Email Address Export query_factory from 154db give white page in 156c
Quote:
Originally Posted by
swguy
Were these queries you added? Because only query #3 had that character in its name.
Yes. I added a couple others that had a > symbol in the name. I have a total of 9 queries in the query_builder table.
- Dormant Customers (>3months) (COMCAST Subscribers)
- Customers Dormant for >3 months (Subscribers)
Re: Email Address Export query_factory from 154db give white page in 156c
Great - thanks for confirming and good luck with your store!