{"action":"created","issue":{"url":"https://api.github.com/repos/woothemes/woocommerce/issues/10367","repository_url":"https://api.github.com/repos/woothemes/woocommerce","labels_url":"https://api.github.com/repos/woothemes/woocommerce/issues/10367/labels{/name}","comments_url":"https://api.github.com/repos/woothemes/woocommerce/issues/10367/comments","events_url":"https://api.github.com/repos/woothemes/woocommerce/issues/10367/events","html_url":"https://github.com/woothemes/woocommerce/issues/10367","id":134268861,"number":10367,"title":"Variations js error","user":{"login":"commercegurus","id":9802286,"avatar_url":"https://avatars.githubusercontent.com/u/9802286?v=3","gravatar_id":"","url":"https://api.github.com/users/commercegurus","html_url":"https://github.com/commercegurus","followers_url":"https://api.github.com/users/commercegurus/followers","following_url":"https://api.github.com/users/commercegurus/following{/other_user}","gists_url":"https://api.github.com/users/commercegurus/gists{/gist_id}","starred_url":"https://api.github.com/users/commercegurus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commercegurus/subscriptions","organizations_url":"https://api.github.com/users/commercegurus/orgs","repos_url":"https://api.github.com/users/commercegurus/repos","events_url":"https://api.github.com/users/commercegurus/events{/privacy}","received_events_url":"https://api.github.com/users/commercegurus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-17T12:42:12Z","updated_at":"2016-02-17T13:32:12Z","closed_at":"2016-02-17T13:11:18Z","body":"Hi folks,\r\nThis seems like a fairly basic use case so apologies if I've missed some elementary here.\r\n\r\nTest case details:\r\n\r\nVariable Product - 2 custom product attributes as follows:\r\nhttp://i.imgur.com/zPtw3Ir.jpg\r\n\r\nVariations configured as follows:\r\nhttp://i.imgur.com/rhIzX4S.jpg\r\n\r\nFrontend experiences a js console error when selecting a variation that doesn't exist:\r\ne.g.\r\nhttp://i.imgur.com/ENtWGcQ.jpg\r\n\r\nFor ease of copying: \r\nConsole output is:\r\nUncaught TypeError: o.replace is not a function\r\n\r\nI've recreated the issue in 2 separate WC2.5.2 installs just now. Here is a temporary example\r\nhttp://factorytutorial.commercegurus.com/?product=variation-test-case\r\n\r\nSystem Report\r\n\r\n### WordPress Environment ###\r\n\r\nHome URL: http://commercegurus.dev\r\nSite URL: http://commercegurus.dev\r\nWC Version: 2.5.2\r\nLog Directory Writable: ✔  /srv/www/commercegurus/htdocs/wp-content/uploads/wc-logs/\r\nWP Version: 4.4.2\r\nWP Multisite: –\r\nWP Memory Limit: 256 MB\r\nWP Debug Mode: –\r\nLanguage: en_US\r\n\r\n### Server Environment ###\r\n\r\nServer Info: nginx/1.7.10\r\nPHP Version: 5.5.9-1ubuntu4.6\r\nPHP Post Max Size: 50 MB\r\nPHP Time Limit: 30\r\nPHP Max Input Vars: 1000\r\nSUHOSIN Installed: –\r\nMySQL Version: 5.5.41\r\nMax Upload Size: 50 MB\r\nDefault Timezone is UTC: ✔\r\nfsockopen/cURL: ✔\r\nSoapClient: ✔\r\nDOMDocument: ✔\r\nGZip: ✔\r\nMultibyte String: ✔\r\nRemote Post: ✔\r\nRemote Get: ✔\r\n\r\n### Database ###\r\n\r\nWC Database Version: 2.5.2\r\n: \r\nwoocommerce_sessions: ✔\r\nwoocommerce_api_keys: ✔\r\nwoocommerce_attribute_taxonomies: ✔\r\nwoocommerce_termmeta: ✔\r\nwoocommerce_downloadable_product_permissions: ✔\r\nwoocommerce_order_items: ✔\r\nwoocommerce_order_itemmeta: ✔\r\nwoocommerce_tax_rates: ✔\r\nwoocommerce_tax_rate_locations: ✔\r\n\r\n### Active Plugins (1) ###\r\n\r\nWooCommerce: by WooThemes – 2.5.2\r\n\r\n### Settings ###\r\n\r\nForce SSL: –\r\nCurrency: GBP (£)\r\nCurrency Position: left\r\nThousand Separator: ,\r\nDecimal Separator: .\r\nNumber of Decimals: 2\r\n\r\n### API ###\r\n\r\nAPI Enabled: ✔\r\nAPI Version: 3.1.0\r\n\r\n### WC Pages ###\r\n\r\nShop Base: #7 - /?page_id=7\r\nCart: #8 - /?page_id=8\r\nCheckout: #9 - /?page_id=9\r\nMy Account: #10 - /?page_id=10\r\n\r\n### Taxonomies ###\r\n\r\nProduct Types: external (external)\r\ngrouped (grouped)\r\nsimple (simple)\r\nvariable (variable)\r\n\r\n\r\n### Theme ###\r\n\r\nName: Twenty Fifteen\r\nVersion: 1.0 – 1.4 is available\r\nAuthor URL: https://wordpress.org/\r\nChild Theme: ✕ – If you're modifying WooCommerce on a parent theme you didn't build personally\r\nthen we recommend using a child theme. See: How to create a child theme\r\n\r\nWooCommerce Support: ✔\r\n\r\n### Templates ###\r\n\r\nOverrides: –\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/woothemes/woocommerce/issues/comments/185204858","html_url":"https://github.com/woothemes/woocommerce/issues/10367#issuecomment-185204858","issue_url":"https://api.github.com/repos/woothemes/woocommerce/issues/10367","id":185204858,"user":{"login":"commercegurus","id":9802286,"avatar_url":"https://avatars.githubusercontent.com/u/9802286?v=3","gravatar_id":"","url":"https://api.github.com/users/commercegurus","html_url":"https://github.com/commercegurus","followers_url":"https://api.github.com/users/commercegurus/followers","following_url":"https://api.github.com/users/commercegurus/following{/other_user}","gists_url":"https://api.github.com/users/commercegurus/gists{/gist_id}","starred_url":"https://api.github.com/users/commercegurus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commercegurus/subscriptions","organizations_url":"https://api.github.com/users/commercegurus/orgs","repos_url":"https://api.github.com/users/commercegurus/repos","events_url":"https://api.github.com/users/commercegurus/events{/privacy}","received_events_url":"https://api.github.com/users/commercegurus/received_events","type":"User","site_admin":false},"created_at":"2016-02-17T13:32:12Z","updated_at":"2016-02-17T13:32:12Z","body":"Hey @mikejolley \r\n\r\nThe js error is definitely happening on the temp example for me (Ubuntu 14.04 - Chrome 46.\r\n\r\nOpen your js console.\r\nGo here:\r\nhttp://factorytutorial.commercegurus.com/?product=variation-test-case\r\n\r\nSize: Medium\r\nMemory: 32GB\r\njs error in the original report is thrown.\r\n\r\nThat variation exists (it was auto created per the original test case report) but I've not touched it yet.\r\n\r\nIs the issue here that this variation is enabled by default when it is created but it is yet to be given a price/stock etc? If so, perhaps even if those records are auto created they should be not enabled by default?\r\n\r\nI would think that a js error should be avoided?\r\n\r\n\r\n\r\n"}}