Forum

Thread tagged as: Shop

Shipping Zone's Not Adding to Database

Hi,

I'm setting up a Perch Shop and adding shipping zones. I enter all the relevant information but get a "Sorry, that update was not successful" message. It wont let me add it to the database. I get the following in my Debug Message.

Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'armstrong.perch2_shop_shipping_zones' doesn't exist

Full Debug

SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='dc1cbf0b57fdbceea56098a291efabd9' LIMIT 1
UPDATE perch2_users SET userHash='b429d5a8860863567e19ede5d28038c9' WHERE userID='1'
[33] SELECT p.privKey FROM perch2_user_privileges p
[34] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID
[7] SELECT collectionID, collectionKey, collectionEditRoles FROM perch2_collections WHERE collectionInAppMenu=1 ORDER BY collectionOrder ASC
Using template: /addons/apps/perch_shop/templates/shop/shippings/zone.html
INSERT INTO perch2_shop_shipping_zones(zoneIsDefault,zoneDynamicFields,zoneCreated) VALUES('1','{\"title\":\"United Kingdom\",\"slug\":\"united-kingdom\",\"description\":{\"_flang\":\"markdown\",\"raw\":\"United Kingdom\",\"processed\":\"<p>United Kingdom<\\/p>\"},\"status\":\"0\",\"countries\":[\"236\"]}','2016-04-21 15:40:37')
Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'armstrong.perch2_shop_shipping_zones' doesn't exist
[248] SELECT * FROM perch2_shop_countries ORDER BY country ASC

Is there a way to force table creation?

Thanks

Dan

Dan Lee

Dan Lee 1 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Can you post your Diagnostics Report please?

Was this a new install or were you on the gamma?

Dan Lee

Dan Lee 1 points

Hi Rachel,

This was a gamma updated to the version that was newly released.

Here is my diagnostic report:

Perch Runway: 2.8.29
Production mode: Production (100)
Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29), collection_5 (2.8.29), collection_2 (2.8.29), collection_1 (2.8.29), collection_6 (2.8.29), perch_forms (1.8.3), collection_4 (2.8.29), perch_shop_orders (1.0), perch_shop_products (1.0), perch_shop (1.0), collection_3 (2.8.29), collection_7 (2.8.29), perch_members (1.5)
DB driver: PDO
DB tables: perch2_backup_plans (0), perch2_backup_resources (0), perch2_backup_runs (0), perch2_categories (9), perch2_category_counts (0), perch2_category_sets (3), perch2_collection_index (16034), perch2_collection_items (340), perch2_collection_revisions (83), perch2_collections (7), perch2_content_index (534), perch2_content_items (110), perch2_content_regions (11), perch2_forms (2), perch2_forms_responses (30), perch2_members (0), perch2_members_forms (0), perch2_members_member_tags (0), perch2_members_sessions (0), perch2_members_tags (0), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_routes (12), perch2_page_templates (32), perch2_pages (24), perch2_resource_log (3278), perch2_resource_tags (8), perch2_resources (933), perch2_resources_to_tags (28), perch2_settings (34), perch2_shop_addresses (0), perch2_shop_admin_index (31), perch2_shop_brands (0), perch2_shop_cart (0), perch2_shop_cart_data (0), perch2_shop_cart_items (0), perch2_shop_countries (248), perch2_shop_currencies (152), perch2_shop_customers (0), perch2_shop_emails (1), perch2_shop_index (0), perch2_shop_option_values (0), perch2_shop_options (0), perch2_shop_order_items (0), perch2_shop_orders (0), perch2_shop_product_files (0), perch2_shop_product_option_values (0), perch2_shop_product_options (0), perch2_shop_product_tags (0), perch2_shop_products (0), perch2_shop_promotions (0), perch2_shop_search (0), perch2_shop_shippings (1), perch2_shop_tax_exhibits (0), perch2_shop_tax_group_rates (1), perch2_shop_tax_groups (1), perch2_shop_tax_locations (1), perch2_shop_tax_rates (2), perch2_shop_variants (0), perch2_user_passwords (0), perch2_user_privileges (33), perch2_user_role_privileges (16), perch2_user_roles (2), perch2_users (1)
Users: 1
App runtimes:
<?php
    $apps_list = array(
        'content',
        'categories',
        'perch_members',
    'perch_forms',
        'perch_shop',
    );
Editor plug-ins: markitup
H1: 509805ffec8547456676464bb77923b6
L1: 4043fa6928ca675d97aec002d2d870e5
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #035b9b
content_singlePageEdit: 1
helpURL:
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.8.13: done
update_runway_2.8.15: done
headerScheme: dark
update_runway_2.8.13: done
latest_version: 2.8.15
on_sale_version: 2.8.29
dashboard: 1
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
siteURL: /
update_runway_2.8.17: done
update_runway_2.8.18: done
update_runway_2.8.23: done
perch_shop_update: g10
perch_members_update: 1.4
update_runway_2.8.24: done
update_runway_2.8.25: done
update_runway_2.8.26: done
update_runway_2.8.29: done
perch_members_login_page: /members/login.php?r={returnURL}
perch_shop_price_tax_mode: exc
perch_shop_trade_price_tax_mode: exc
perch_shop_site_url: https://
perch_shop_product_url: /shop/products/{slug}
perch_shop_default_currency: 47
perch_shop_reporting_currency: 47
perch_shop_invoice_number_format: Invoice%d
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_SITEPATH: /Users/danlee/Sites/Work/armstrong
PERCH_SCHEDULE_SECRET: 3zusF5zHjpqi6Yyi
PERCH_DB_USERNAME: db129224
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: armstrong
PERCH_DB_PREFIX: perch2_
PERCH_EMAIL_FROM: dan.lee@uk-cpi.com
PERCH_EMAIL_FROM_NAME: Dan Lee
PERCH_LOGINPATH: /login
PERCH_PATH: /Users/danlee/Sites/Work/armstrong/login
PERCH_CORE: /Users/danlee/Sites/Work/armstrong/login/core
PERCH_RESFILEPATH: /Users/danlee/Sites/Work/armstrong/login/resources
PERCH_RESPATH: /login/resources
PERCH_HTML5: 1
PERCH_TZ: Europe/London
PERCH_EMAIL_METHOD: smtp
PERCH_EMAIL_HOST: smtp.gmail.com
PERCH_EMAIL_AUTH: 1
PERCH_EMAIL_SECURE: ssl
PERCH_EMAIL_PORT: 465
PERCH_EMAIL_USERNAME: ukcpiweb@gmail.com
PERCH_YOUTUBE_API_KEY: AIzaSyABObR78cRpeVORGJkYkKEAclJodKiURcE
PERCH_DEBUG: 1
PERCH_RUNWAY: 1
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: /Users/danlee/Sites/Work/armstrong/login/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_APPS_EDITOR_PLUGIN: markitup
PERCH_APPS_EDITOR_MARKUP_LANGUAGE: textile
HOSTING SETTINGS

PHP: 5.5.20
Zend: 2.5.0
OS: Darwin
SAPI: apache2handler
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: bf9ad53b11c9a57efdb1057292d73b928b8c5c77 $
MySQL server: 5.6.24
Free disk space: 673.38 GB
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dba, dom, hash, fileinfo, filter, ftp, gd, SPL, iconv, json, ldap, mbstring, session, standard, mysqlnd, mysqli, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, mysql, shmop, SimpleXML, snmp, soap, sockets, exif, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, apache2handler
GD: Yes
ImageMagick: No
PHP max upload size: 120M
PHP max form post size: 122M
PHP memory limit: 228M
Total max uploadable file size: 120M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
HTTP_HOST: armstrong.dev
HTTP_CONNECTION: keep-alive
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36
HTTP_REFERER: https://armstrong.dev/login/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
HTTP_COOKIE: cookieconsent_dismissed=yes; MCEvilPopupClosed=yes; _ga=GA1.2.2035432822.1445252319; cmssb=0; cmsa=1; PHPSESSID=limrb6e0v5md9spdi6hkmje8b0
PATH: /usr/bin:/bin:/usr/sbin:/sbin
SERVER_SOFTWARE: Apache/2.4.10 (Unix) PHP/5.5.20
SERVER_NAME: armstrong.dev
SERVER_ADDR: 127.0.0.1
SERVER_PORT: 80
REMOTE_ADDR: 127.0.0.1
DOCUMENT_ROOT: /Users/danlee/Sites/Work/armstrong
REQUEST_SCHEME: http
CONTEXT_DOCUMENT_ROOT: /Users/danlee/Sites/Work/armstrong
SERVER_ADMIN: you@example.com
SCRIPT_FILENAME: /Users/danlee/Sites/Work/armstrong/login/core/settings/diagnostics/index.php
REMOTE_PORT: 64482
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /login/core/settings/diagnostics/?extended
SCRIPT_NAME: /login/core/settings/diagnostics/index.php
PHP_SELF: /login/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1461770294.617
REQUEST_TIME: 1461770294
Drew McLellan

Drew McLellan 2638 points
Perch Support

Did you run the final gamma update before moving to v1.0? If not, you should do that.

Dan Lee

Dan Lee 1 points

No I didn't. Is there anyway I can retrospectively do that? Would deleting the shop tables in the database be a solution?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, you can do either. If you're happy to lose what you have, deleting the tables and installing 1.0.1 fresh would help.

Otherwise run the update script from the final gamma.