Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating product entry with variable used in Asset path #3364

Closed
peteeveleigh opened this issue Oct 10, 2018 · 3 comments
Closed

Error creating product entry with variable used in Asset path #3364

peteeveleigh opened this issue Oct 10, 2018 · 3 comments

Comments

@peteeveleigh
Copy link

peteeveleigh commented Oct 10, 2018

Description

An error along the lines of

Failed to load Twig template "_includes/field", index "99371000": cache is corrupted.

Is shown when creating a new Commerce product if the product type has an Assets field which uses a variable in its path setting.

I have tried clearing the cache to no avail

Steps to reproduce

  1. Create an assets field type pointing at a valid asset source and set the path to contain a variable such as {slug}
  2. Add the field to a product type
  3. Create a new product entry for that type

Additional info

  • Craft version: 3.0.26.1
  • PHP version: 7.1.12
  • Database driver & version: MySQL5.6.38
  • Plugins & versions: Commerce 2.0.0.beta.11

Stack Trace

Twig_Error_Runtime: Failed to load Twig template "_includes/field", index "99371000": cache is corrupted. in /Users/pete/Projects/OurName/ClientName/dev/build/vendor/craftcms/cms/src/templates/_includes/field.html:28
Stack trace:
#0 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/craftcms/cms/src/web/twig/Environment.php(40): Twig_Environment->loadTemplate('_includes/field', '99371000')
#1 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/twig/twig/lib/Twig/Template.php(330): craft\web\twig\Environment->loadTemplate('_includes/field', '99371000')
#2 /Users/pete/Projects/OurName/ClientName/dev/build/storage/runtime/compiled_templates/07/07e1c86c54ad2da9cf8c867bb194e1a36a092ecbdb53ca5c30631c27ab8d6d6d.php(96): Twig_Template->loadTemplate('_includes/field', '_includes/field', 28, '99371000')
#3 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/twig/twig/lib/Twig/Template.php(390): __TwigTemplate_a4afff2ba76d8eaddfb93c603b393101ea4ad355865589a53331b8d1c3f305b7->doDisplay(Array, Array)
#4 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#5 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/twig/twig/lib/Twig/Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#6 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#7 /Users/pete/Projects/OurName/ClientName/dev/build/storage/runtime/compiled_templates/b3/b3ce7b00bf6b1a7af298fa4f9e0e86a0833b9a0101bd77477200e7e66d5ac6dc.php(47): craft\web\twig\Template->display(Array)
#8 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/twig/twig/lib/Twig/Template.php(390): __TwigTemplate_07e51379636458911a874d3d5fe4b2384a27e7feb5079fb73eeca93be7c3f68d->doDisplay(Array, Array)
#9 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#10 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/twig/twig/lib/Twig/Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#11 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#12 /Users/pete/Projects/OurName/ClientName/dev/build/storage/runtime/compiled_templates/5a/5a53d05b22f4366cfd6f2da922b790ad4a27adb7db5155fc5ffe6462a0d360af.php(83): craft\web\twig\Template->display(Array)
#13 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/twig/twig/lib/Twig/Template.php(390): __TwigTemplate_1da6780498b8a7ae3501b4e664837b12e98965f63878a8e1d5e6160e336ebf5f->doDisplay(Array, Array)
#14 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#15 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/twig/twig/lib/Twig/Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#16 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#17 /Users/pete/Projects/OurName/ClientName/dev/build/storage/runtime/compiled_templates/5d/5d67f46f0277b2943d1ae3973de13a576f197fcdec06c4023e9a5d94e052005b.php(206): craft\web\twig\Template->display(Array)
#18 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/twig/twig/lib/Twig/Template.php(390): __TwigTemplate_bc07c81b287dc708149fc6284f040c4c93df0221c68ee766ef3808c5542c1d0e->doDisplay(Array, Array)
#19 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/craftcms/cms/src/web/twig/Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array)
#20 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/twig/twig/lib/Twig/Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array)
#21 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/craftcms/cms/src/web/twig/Template.php(31): Twig_Template->display(Array, Array)
#22 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/twig/twig/lib/Twig/Template.php(375): craft\web\twig\Template->display(Array)
#23 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/twig/twig/lib/Twig/Environment.php(289): Twig_Template->render(Array)
#24 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/craftcms/cms/src/web/View.php(331): Twig_Environment->render('commerce/produc...', Array)
#25 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/craftcms/commerce/src/helpers/VariantMatrix.php(43): craft\web\View->renderTemplate('commerce/produc...', Array)
#26 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/craftcms/commerce/src/controllers/ProductsController.php(118): craft\commerce\helpers\VariantMatrix::getVariantMatrixHtml(Object(craft\commerce\elements\Product))
#27 [internal function]: craft\commerce\controllers\ProductsController->actionEditProduct('tiles', NULL, NULL, NULL)
#28 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#29 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#30 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/craftcms/cms/src/web/Controller.php(103): yii\base\Controller->runAction('edit-product', Array)
#31 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('edit-product', Array)
#32 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/craftcms/cms/src/web/Application.php(282): yii\base\Module->runAction('commerce/produc...', Array)
#33 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('commerce/produc...', Array)
#34 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/craftcms/cms/src/web/Application.php(271): yii\web\Application->handleRequest(Object(craft\web\Request))
#35 /Users/pete/Projects/OurName/ClientName/dev/build/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#36 /Users/pete/Projects/OurName/ClientName/dev/build/public/index.php(21): yii\base\Application->run()
#37 {main}
@brandonkelly
Copy link
Member

We’re not able to reproduce this. Can you please send your composer.json and composer.lock files, as well as a database backup, over to [email protected]?

@brandonkelly
Copy link
Member

We were able to get a different error, which is likely related, actually, even if not exactly what you’re seeing.

@brandonkelly
Copy link
Member

Most likely just fixed the specific error you’re getting, but we will also need to fix part of this from Commerce’s end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants