Forum

Thread tagged as: Problem, Error

Free shipping error in admin panel

I get an error in admin panel, when I try to set a promotion for a free shipping. This happens when I select Shipping methods just below "Apply to shipping" and when I try to save it. Can someone suggest me how I can fix it?

Thanks

Warning: trim() expects parameter 1 to be string, array given in .../public_html/perch/addons/apps/perch_shop/fieldtypes.php on line 151

Warning: PDO::quote() expects parameter 1 to be string, array given in .../public_html/perch/core/lib/PerchDB_MySQL.class.php on line 382

Warning: Cannot modify header information - headers already sent by (output started at .../public_html/perch/addons/apps/perch_shop/fieldtypes.php:151) in .../public_html/perch/core/lib/PerchUtil.class.php on line 1211

Warning: Cannot modify header information - headers already sent by (output started at .../public_html/perch/addons/apps/perch_shop/fieldtypes.php:151) in .../public_html/perch/core/lib/PerchUtil.class.php on line 1212

Warning: Cannot modify header information - headers already sent by (.../public_html/perch/addons/apps/perch_shop/fieldtypes.php:151) in .../public_html/perch/core/lib/PerchUtil.class.php on line 1213

Warning: Cannot modify header information - headers already sent by (.../public_html/perch/addons/apps/perch_shop/fieldtypes.php:151) in .../public_html/perch/core/lib/PerchUtil.class.php on line 1219

Warning: Cannot modify header information - headers already sent by (output started at .../public_html/perch/addons/apps/perch_shop/fieldtypes.php:151) in .../public_html/perch/core/inc/top.php on line 17

Maciej Pieńczewski

Maciej Pieńczewski 0 points

  • 4 years ago

debug

SELECT * FROM perch2_shop_shippings WHERE shippingID= AND shippingDeleted IS NULL LIMIT 1
Invalid query: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND shippingDeleted IS NULL LIMIT 1' at line 1
Drew McLellan

Drew McLellan 2638 points
Perch Support

Is this in Shipping or Promotions?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Can we see your Diagnostics Report please?

This is in Promotions, when I try to set a new promo code for free shipping and when I try to select "Shipping methods" for "Apply to shipping" set to "yes"

Diagnostics

Perch: 2.8.32
Production mode: Production (100)
Installed apps: content (2.8.32), assets (2.8.32), categories (2.8.32), perch_blog (5.0), perch_shop_orders (1.0.10), perch_shop_products (1.0.10), perch_shop (1.0.10), perch_members (1.5)
DB driver: PDO
DB tables: perch2_blog_authors (2), perch2_blog_comments (0), perch2_blog_index (245), perch2_blog_posts (3), perch2_blog_posts_to_tags (0), perch2_blog_sections (1), perch2_blog_tags (0), perch2_blogs (1), perch2_categories (14), perch2_category_counts (0), perch2_category_sets (2), perch2_content_index (251), perch2_content_items (84), perch2_content_regions (15), perch2_members (14), perch2_members_forms (1), perch2_members_member_tags (0), perch2_members_sessions (2), perch2_members_tags (0), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_templates (1), perch2_pages (11), perch2_resource_log (1258), perch2_resource_tags (2), perch2_resources (1663), perch2_resources_to_tags (16), perch2_settings (34), perch2_shop_addresses (1580), perch2_shop_admin_index (380), perch2_shop_brands (1), perch2_shop_cart (8468), perch2_shop_cart_data (664), perch2_shop_cart_items (314), perch2_shop_countries (248), perch2_shop_currencies (152), perch2_shop_customers (400), perch2_shop_emails (2), perch2_shop_index (7036), perch2_shop_option_values (8), perch2_shop_options (2), perch2_shop_order_items (905), perch2_shop_order_promotions (16), perch2_shop_order_statuses (9), perch2_shop_orders (395), perch2_shop_orders_meta (1), perch2_shop_product_files (0), perch2_shop_product_option_values (38), perch2_shop_product_options (22), perch2_shop_product_tags (0), perch2_shop_products (185), perch2_shop_promotions (2), perch2_shop_search (156), perch2_shop_shipping_zone_countries (1), perch2_shop_shipping_zones (1), perch2_shop_shippings (12), perch2_shop_tax_exhibits (783), perch2_shop_tax_group_rates (0), perch2_shop_tax_groups (1), perch2_shop_tax_locations (1), perch2_shop_tax_rates (1), perch2_shop_variants (65), perch2_user_passwords (0), perch2_user_privileges (74), perch2_user_role_privileges (30), perch2_user_roles (2), perch2_users (3)
Users: 3
App runtimes:
<?php
    $apps_list = array(
        'content',
        'categories',
        'perch_blog',
        'perch_members',
        'perch_shop',
    );
?>
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup, redactor
H1: d1406189caa7f2b79e7ee0b1ccb49203
L1: 177ec0db7992f29090329cc1964db512
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #f0f8f7
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
update_2.8.29: done
latest_version: 2.8.15
on_sale_version: 2.8.32
headerScheme: light
perch_members_login_page: /members/login.php?r={returnURL}
perch_shop_price_tax_mode: inc
perch_shop_site_url: https://bee-eco.pl/
perch_shop_product_url: /shop/products/{slug}
perch_shop_invoice_number_format: %d
dashboard: 0
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
perch_shop_default_currency: 110
perch_shop_reporting_currency: 110
perch_members_update: 1.4
perch_blog_update: 5.0.1
perch_blog_post_url: /blog/post.php?s={postSlug}
perch_blog_site_name:
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
perch_blog_comment_notify: 0
logoPath: /perch/resources/logo-black-1.png
update_2.8.31: done
perch_shop_update: 1.0.10
update_2.8.32: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: (***hidden***)
PERCH_DB_SERVER: (***hidden***)
PERCH_DB_DATABASE: (***hidden***)
PERCH_DB_PREFIX: perch2_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: (***hidden***)
PERCH_EMAIL_FROM_NAME: Maciej Pienczewski
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/klient.dhosting.pl/beeeco/bee-eco.pl/public_html/perch
PERCH_CORE: /home/klient.dhosting.pl/beeeco/bee-eco.pl/public_html/perch/core
PERCH_RESFILEPATH: /home/klient.dhosting.pl/beeeco/bee-eco.pl/public_html/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_DEBUG: 1
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /home/klient.dhosting.pl/beeeco/bee-eco.pl/public_html/perch/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20
PERCH_SHOP_VERSION: 1.0.10
PERCH_APPS_EDITOR_PLUGIN: markitup
PERCH_APPS_EDITOR_MARKUP_LANGUAGE: textile
HOSTING SETTINGS

PHP: 5.6.23-dh101cl
Zend: 2.6.0
OS: Linux
SAPI: litespeed
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
MySQL server: 5.5.5-10.0.25-MariaDB-cll-lve
Free disk space: 1.60 TB
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, gettext, SPL, iconv, session, interbase, intl, json, ldap, mbstring, mcrypt, mssql, standard, mysqlnd, mysqli, odbc, mysql, PDO, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, Reflection, imap, shmop, SimpleXML, snmp, soap, sockets, exif, sybase_ct, sysvmsg, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, litespeed, dba, geoip, mailparse, memcache, memcached, mhash, ionCube Loader, Zend OPcache
GD: Yes
ImageMagick: No
PHP max upload size: 200M
PHP max form post size: 32M
PHP memory limit: 2048M
Total max uploadable file size: 32M
Resource folder writeable: Yes
Session timeout: 16.65 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
TMPDIR: /home/klient.dhosting.pl/beeeco/.tmp
PHPRC: /home/klient.dhosting.pl/beeeco/.settings/
LANG: pl_PL.UTF-8
MAGICK_THREAD_LIMIT: 1
PATH: /bin:/usr/bin:/usr/local/bin
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: pl,en-US;q=0.8,en;q=0.6,de;q=0.4,fr;q=0.2
HTTP_CONNECTION: keep-alive
HTTP_COOKIE: cmsa=1; p_m=; PHPSESSID=1e01cc4bb4352d53ee379abdd3bdae2a
HTTP_HOST: bee-eco.pl
HTTP_REFERER: https://bee-eco.pl/perch/core/settings/diagnostics/
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36
HTTP_UPGRADE_INSECURE_REQUESTS: 1
DOCUMENT_ROOT: /home/klient.dhosting.pl/beeeco/bee-eco.pl/public_html
REMOTE_ADDR: 95.160.148.99
REMOTE_PORT: 61336
SERVER_ADDR: 109.95.156.6
SERVER_NAME: bee-eco.pl
SERVER_ADMIN: admin@demonek.com
SERVER_PORT: 80
REQUEST_URI: /perch/core/settings/diagnostics/?extended
SCRIPT_FILENAME: /home/klient.dhosting.pl/beeeco/bee-eco.pl/public_html/perch/core/settings/diagnostics/index.php
QUERY_STRING: extended
SCRIPT_URI: https://bee-eco.pl/perch/core/settings/diagnostics/
SCRIPT_URL: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
SERVER_PROTOCOL: HTTP/1.1
SERVER_SOFTWARE: LiteSpeed
REQUEST_METHOD: GET
X-LSCACHE: 1
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1480336512.0531
REQUEST_TIME: 1480336512
argc: 1
Drew McLellan

Drew McLellan 2638 points
Perch Support

How many shipping methods do you have defined? Have you picked one from the list?

I have 6 shipping methods in general. And I picked 2 shipping methods for this promotion, but when I try to save happens this what I posted above.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Does it work if you pick just one?

No. Only when shipping checkboxes are empty I get no errors. If I select any or just one checkbox I get this error.

Drew McLellan

Drew McLellan 2638 points
Perch Support

We'll see if we can reproduce it.

Did You manage to find any solution?

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, but I have it logged to look into.