I am having some issues with my woocommerce store. Clients are experiencing trouble when checking out. They fill in all the required fields, and check the t’s & c’s – but then receive a ‘blank woocommerce error’ showing only a red exclamation mark with no error message.
I have tried the checkout from my end and am able to place orders, however many clients are having this problem.
Here are the ‘fatal errors’ in my woocommerce log:
2021-02-03T02:07:38+00:00 CRITICAL Uncaught Exception: Invalid product. in /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:166
Stack trace:
#0 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): WC_Product_Data_Store_CPT->read(Object(WC_Product))
#1 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php(135): WC_Data_Store->read(Object(WC_Product))
#2 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce-time-based-pricing/classes/com/WCTBP_Cart.php(42): WC_Product->__construct(2991)
#3 /usr/www/users/cherrfqzxc/wp-includes/class-wp-hook.php(287): WCTBP_Cart->cart_add_to_validation(true, 2991, 1, '', Array)
#4 /usr/www/users/cherrfqzxc/wp-includes/plugin.php(212): WP_Hook->apply_filters(true, Array)
#5 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/class-wc-form-handler.php(902): apply_filters('woocommerce_add...', true, 2991, 1, '', Array)
#6 /usr/www/users/cherrfqzxc/ in /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php on line 166
2021-02-03T02:13:39+00:00 CRITICAL Uncaught Exception: Invalid product. in /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:166
Stack trace:
#0 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): WC_Product_Data_Store_CPT->read(Object(WC_Product))
#1 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php(135): WC_Data_Store->read(Object(WC_Product))
#2 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce-time-based-pricing/classes/com/WCTBP_Cart.php(42): WC_Product->__construct(3024)
#3 /usr/www/users/cherrfqzxc/wp-includes/class-wp-hook.php(287): WCTBP_Cart->cart_add_to_validation(true, 3024, 1, '', Array)
#4 /usr/www/users/cherrfqzxc/wp-includes/plugin.php(212): WP_Hook->apply_filters(true, Array)
#5 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/class-wc-form-handler.php(902): apply_filters('woocommerce_add...', true, 3024, 1, '', Array)
#6 /usr/www/users/cherrfqzxc/ in /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php on line 166
2021-02-03T02:27:02+00:00 CRITICAL Uncaught Exception: Invalid product. in /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:166
Stack trace:
#0 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): WC_Product_Data_Store_CPT->read(Object(WC_Product))
#1 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php(135): WC_Data_Store->read(Object(WC_Product))
#2 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce-time-based-pricing/classes/com/WCTBP_Cart.php(42): WC_Product->__construct(2999)
#3 /usr/www/users/cherrfqzxc/wp-includes/class-wp-hook.php(287): WCTBP_Cart->cart_add_to_validation(true, 2999, 1, '', Array)
#4 /usr/www/users/cherrfqzxc/wp-includes/plugin.php(212): WP_Hook->apply_filters(true, Array)
#5 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/class-wc-form-handler.php(902): apply_filters('woocommerce_add...', true, 2999, 1, '', Array)
#6 /usr/www/users/cherrfqzxc/ in /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php on line 166
2021-02-03T05:18:25+00:00 CRITICAL Uncaught Exception: Invalid product. in /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:166
Stack trace:
#0 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): WC_Product_Data_Store_CPT->read(Object(WC_Product))
#1 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php(135): WC_Data_Store->read(Object(WC_Product))
#2 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce-time-based-pricing/classes/com/WCTBP_Cart.php(42): WC_Product->__construct(3066)
#3 /usr/www/users/cherrfqzxc/wp-includes/class-wp-hook.php(287): WCTBP_Cart->cart_add_to_validation(true, 3066, 1, '', Array)
#4 /usr/www/users/cherrfqzxc/wp-includes/plugin.php(212): WP_Hook->apply_filters(true, Array)
#5 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/class-wc-form-handler.php(902): apply_filters('woocommerce_add...', true, 3066, 1, '', Array)
#6 /usr/www/users/cherrfqzxc/ in /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php on line 166
2021-02-03T07:28:12+00:00 CRITICAL Uncaught Exception: Invalid product. in /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php:166
Stack trace:
#0 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): WC_Product_Data_Store_CPT->read(Object(WC_Product))
#1 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php(135): WC_Data_Store->read(Object(WC_Product))
#2 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce-time-based-pricing/classes/com/WCTBP_Cart.php(42): WC_Product->__construct(3066)
#3 /usr/www/users/cherrfqzxc/wp-includes/class-wp-hook.php(287): WCTBP_Cart->cart_add_to_validation(true, 3066, 1, '', Array)
#4 /usr/www/users/cherrfqzxc/wp-includes/plugin.php(212): WP_Hook->apply_filters(true, Array)
#5 /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/class-wc-form-handler.php(902): apply_filters('woocommerce_add...', true, 3066, 1, '', Array)
#6 /usr/www/users/cherrfqzxc/ in /usr/www/users/cherrfqzxc/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php on line 166
I have :
Updated all plugins
Updated the theme
Checked the system status / health report, no issues are showing other than inactive plugins to be removed
Is the problem being caused purely by Woocommerce, or by the theme, or a conflict between Woocommerce and the theme?
Link to Site
Those things can happen, as far as I can see it is a product that is invalid, have you checked the information about the product and did you use normal characters in the information when you made the product?
If everything is correct maybe check the database, and see if the product that you have added has all the right values in the database, if so maybe a rollback to the previous version of Woocommerce will fix the problem.
Let me know,
Jeff
Related
PDOException: SQLSTATE[HY000]: General error: 1298 Unknown or incorrect time zone: 'Asia/Kolkata' in /var/www/dresscode2/app/Providers/Database.php:34 Stack trace: #0 [internal function]: PDO->exec('SET time_zone="...') #1 /var/www/dresscode2/app/Providers/Database.php(34): Phalcon\Db\Adapter\Pdo->execute('SET time_zone="...') #2 [internal function]: App\Providers\Database->App\Providers{closure}() #3 [internal function]: Phalcon\Di\Service->resolve(NULL, Object(Phalcon\Di\FactoryDefault)) #4 [internal function]: Phalcon\Di->get('db', NULL) #5 /var/www/dresscode2/app/Providers/Session.php(18): Phalcon\Di->getShared('db') #6 [internal function]: App\Providers\Session->App\Providers{closure}() #7 /var/www/dresscode2/app/Modules/Backend/Module.php(39): Phalcon\Di\Service->resolve() #8 [internal function]: App\Modules\Backend\Module->registerServices(Object(Phalcon\Di\FactoryDefault)) #9 /var/www/dresscode2/app/WebApplication.php(71): Phalcon\Mvc\Application->handle(NULL) #10 /var/www/dresscode2/public/index.php(20): App\WebApplication->handle() #11 {main} here thi isssue is coming
It looks like the time zone data isn't loaded into MariaDB.
This can be done with mariadb-tzinfo-to-sql, or the pre-generated information from mariadb mirrors.
I got this error in a Symfony custom console command:
ErrorException: Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in <PROJECT_DIR>/backend/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFile
The error was generated by a Doctrine ORM query and the problem is repeatable.
First things first, I suggested to update Symfony from 4.4.2 version to 4.4.20, but it doesn't seem doable in the short term.
I found this issue on Symfony project's git:
https://github.com/symfony/symfony/issues/29605
but I cannot find a doctrine listener in my code that use SessionInterface, so I'm in a dead end.
Do you have any ideas how I can fix this console command without rewrite all from scratch?
This is the stacktrace:
ErrorException: Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in <PROJECT_DIR>/backend/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFile
SessionHandler.php:52 Stack trace:
#0 <PROJECT_DIR>/backend/var/cache/prod/Container0iTkVVw/srcApp_KernelProdDebugContainer.php(1367): Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler->__construct('<PROJECT_DIR>...')
#1 <PROJECT_DIR>/backend/var/cache/prod/Container0iTkVVw/srcApp_KernelProdDebugContainer.php(1823): Container0iTkVVw\srcApp_KernelProdDebugContainer->getSessionService()
#2 <PROJECT_DIR>/backend/vendor/symfony/dependency-injection/Container.php(444): Container0iTkVVw\srcApp_KernelProdDebugContainer->getApp_Context_ListenerService()
#3 <PROJECT_DIR>/backend/vendor/symfony/dependency-injection/Argument/ServiceLocator.php(40): Symfony\Component\DependencyInjection\Container->getService('privates', 'app.context.lis...', 'getApp_Context_...', false)
#4 <PROJECT_DIR>/backend/vendor/symfony/doctrine-bridge/ContainerAwareEventManager.php(136): Symfony\Component\DependencyInjection\Argument\ServiceLocator->get('app.context.lis...')
#5 <PROJECT_DIR>/backend/vendor/symfony/doctrine-bridge/ContainerAwareEventManager.php(74): Symfony\Bridge\Doctrine\ContainerAwareEventManager->initializeListeners('prePersist')
#6 <PROJECT_DIR>/backend/vendor/gedmo/doctrine-extensions/lib/Gedmo/SoftDeleteable/Filter/SoftDeleteableFilter.php(95): Symfony\Bridge\Doctrine\ContainerAwareEventManager->getListeners()
#7 <PROJECT_DIR>/backend/vendor/gedmo/doctrine-extensions/lib/Gedmo/SoftDeleteable/Filter/SoftDeleteableFilter.php(51): Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter->getListener()
#8 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Query/SqlWalker.php(508): Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter->addFilterConstraint(Object(Doctrine\ORM\Mapping\ClassMetadata), 'm0_')
#9 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Query/SqlWalker.php(1786): Doctrine\ORM\Query\SqlWalker->generateFilterConditionSQL(Object(Doctrine\ORM\Mapping\ClassMetadata), 'm0_')
#10 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Query/SqlWalker.php(526): Doctrine\ORM\Query\SqlWalker->walkWhereClause(Object(Doctrine\ORM\Query\AST\WhereClause))
#11 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php(42): Doctrine\ORM\Query\SqlWalker->walkSelectStatement(Object(Doctrine\ORM\Query\AST\SelectStatement))
#12 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Query/SqlWalker.php(278): Doctrine\ORM\Query\Exec\SingleSelectExecutor->__construct(Object(Doctrine\ORM\Query\AST\SelectStatement), Object(Doctrine\ORM\Query\SqlWalker))
#13 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(399): Doctrine\ORM\Query\SqlWalker->getExecutor(Object(Doctrine\ORM\Query\AST\SelectStatement))
#14 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(286): Doctrine\ORM\Query\Parser->parse()
#15 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(298): Doctrine\ORM\Query->_parse()
#16 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(992): Doctrine\ORM\Query->_doExecute()
#17 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(947): Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(NULL, 1)
#18 <PROJECT_DIR>/backend/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(750): Doctrine\ORM\AbstractQuery->execute(NULL, 1)
#19 <PROJECT_DIR>/backend/src/Repository/MemberRepository.php(320): Doctrine\ORM\AbstractQuery->getResult()
#20 <PROJECT_DIR>/backend/src/Services/SyncActiveCampaignManager.php(604): App\Repository\MemberRepository->findByExtactFiscalCode('XXXXXXXXXXXXXXX...')
#21 <PROJECT_DIR>/backend/src/Services/SyncActiveCampaignManager.php(565): App\Services\SyncActiveCampaignManager->syncSingleACContacts(Array, Array)
#22 <PROJECT_DIR>/backend/src/Command/SyncActiveCampaignCommand.php(118): App\Services\SyncActiveCampaignManager->syncExistingACContacts(Array, Array, 10)
#23 <PROJECT_DIR>/backend/vendor/symfony/console/Command/Command.php (251): App\Command\SyncActiveCampaignCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 <PROJECT_DIR>/backend/vendor/symfony/console/Application.php(904): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 <PROJECT_DIR>/backend/vendor/symfony/framework-bundle/Console/Application.php(89): Symfony\Component\Console\Application->doRunCommand(Object(App\Command\SyncActiveCampaignCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 <PROJECT_DIR>/backend/vendor/symfony/console/Application.php(262): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand(Object(App\Command\SyncActiveCampaignCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 <PROJECT_DIR>/backend/vendor/symfony/framework-bundle/Console/Application.php(75): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#28 <PROJECT_DIR>/backend/vendor/symfony/console/Application.php(145): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#29 <PROJECT_DIR>/backend/bin/console(39): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput))
#30 {main} [] []
I have a Drupal 8.9.6 site with Gutenberg 8.x-1.11 and Webform 8.x-5.20.
When we go to edit an existing webform elements, or add a new element, we get the following error:
Error: Call to undefined method Drupal\webform\Entity\Webform::getFields() in gutenberg_entity_presave() (line 621 of /code/web/modules/contrib/gutenberg/gutenberg.module)
#0 [internal function]: gutenberg_entity_presave(Object(Drupal\webform\Entity\Webform), 'webform')
#1 /code/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(403): call_user_func_array('gutenberg_entit...', Array)
#2 /code/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(349): Drupal\Core\Extension\ModuleHandler->invokeAll('entity_presave', Array)
#3 /code/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(500): Drupal\Core\Config\Entity\ConfigEntityStorage->invokeHook('presave', Object(Drupal\webform\Entity\Webform))
#4 /code/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(454): Drupal\Core\Entity\EntityStorageBase->doPreSave(Object(Drupal\webform\Entity\Webform))
#5 /code/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(263): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\webform\Entity\Webform))
#6 /code/web/modules/contrib/webform/src/WebformEntityStorage.php(133): Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object(Drupal\webform\Entity\Webform))
#7 /code/web/core/lib/Drupal/Core/Entity/EntityBase.php(395): Drupal\webform\WebformEntityStorage->save(Object(Drupal\webform\Entity\Webform))
#8 /code/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php(616): Drupal\Core\Entity\EntityBase->save()
#9 /code/web/modules/contrib/webform/modules/webform_ui/src/Form/WebformUiElementDeleteForm.php(217): Drupal\Core\Config\Entity\ConfigEntityBase->save()
#10 [internal function]: Drupal\webform_ui\Form\WebformUiElementDeleteForm->submitForm(Array, Object(Drupal\Core\Form\FormState))
#11 /code/web/core/lib/Drupal/Core/Form/FormSubmitter.php(114): call_user_func_array(Array, Array)
#12 /code/web/core/lib/Drupal/Core/Form/FormSubmitter.php(52): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState))
#13 /code/web/core/lib/Drupal/Core/Form/FormBuilder.php(593): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState))
#14 /code/web/core/lib/Drupal/Core/Form/FormBuilder.php(321): Drupal\Core\Form\FormBuilder->processForm('webform_ui_elem...', Array, Object(Drupal\Core\Form\FormState))
#15 /code/web/core/lib/Drupal/Core/Controller/FormController.php(91): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\webform_ui\Form\WebformUiElementDeleteForm), Object(Drupal\Core\Form\FormState))
#16 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#17 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#18 /code/web/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#19 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#20 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#21 /code/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#22 /code/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#23 /code/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /code/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /code/vendor/asm89/stack-cors/src/Asm89/Stack/Cors.php(49): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /code/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Asm89\Stack\Cors->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /code/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /code/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 /code/web/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#32 /code/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#33 {main}
I have attempted to create an account on drupal.org but my requests are blocked.
Any thoughts on why this would happen? Should I try the alpha versions of both on a dev site and see if that fixes it? I did not attempt to edit the modules directly.
I'm using this:
Future<Object> get(String endpoint) async {
var httpClientRequest = await httpClient.getUrl(Uri.parse(_url + endpoint));
_addCookies(httpClientRequest);
final httpClientResponse = await httpClientRequest.close();
return httpClientResponse
.transform(utf8.decoder)
.transform(json.decoder)
.first;
}
from here https://stackoverflow.com/a/60344779/10116440
to get a json from my API. But I get
Unhandled exception:
FormatException: Unexpected character (at character 1)
<!DOCTYPE html>
^
#0 _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1394:5)
#1 _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1261:9)
#2 _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:926:22)
#3 _JsonStringDecoderSink.addSlice (dart:convert-patch/convert_patch.dart:1480:13)
#4 _JsonStringDecoderSink.add (dart:convert-patch/convert_patch.dart:1485:5)
#5 _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:74:18)
#6 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:122:24)
#7 _RootZone.runUnaryGuarded (dart:async/zone.dart:1316:10)
#8 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:338:11)
#9 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:265:7)
#10 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:70:11)
#11 _EventSinkWrapper.add (dart:async/stream_transformers.dart:17:11)
#12 _StringAdapterSink.add (dart:convert/string_conversion.dart:238:11)
#13 _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:243:7)
#14 _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:314:20)
#15 _Utf8ConversionSink.add (dart:convert/string_conversion.dart:307:5)
#16 _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:74:18)
#17 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:122:24)
#18 _RootZone.runUnaryGuarded (dart:async/zone.dart:1316:10)
#19 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:338:11)
#20 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:265:7)
#21 _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:134:11)
#22 _ForwardingStream._handleData (dart:async/stream_pipe.dart:100:10)
#23 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:166:13)
#24 _RootZone.runUnaryGuarded (dart:async/zone.dart:1316:10)
#25 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:338:11)
#26 _DelayedData.perform (dart:async/stream_impl.dart:593:14)
#27 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:709:11)
#28 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:669:7)
#29 _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#30 _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#31 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#32 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:175:5)
but I'm positive that the API returns json, not HTML.
What is going on? My API doesn't even return HTML, how can it complain that there's a doctype?
By default, most web app servers reply with various HTML pages when an error occurs (404 not found, 401 not authorized, 500 internal exception etc.)
Try checking the HTTP status code of the response instead of assuming it's always a successful JSON response. If the status code is not 200, it may not be a JSON.
I have just installed a fresh copy of WordPress on a Google GCP App Engine STANDARD environment following these steps: https://cloud.google.com/community/tutorials/run-wordpress-on-appengine-standard
The last step is pretty unclear or uncomplete. I have create the bucket (GCP Storage), installed the GCS official plugin (0.1.5) but when I upload some images on media folder i have this error:
Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `GET https://www.googleapis.com/storage/v1/b/xxx-news.appspot.com/o/1%2F2019%2F11` resulted in a `404 Not Found` response: { "error": { "code": 404, "message": "No such object: xxx-news.appspot.com/1/2019/11", "errors": [ (truncated...) in /srv/wp-content/plugins/gcs/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace: #0 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/guzzle/src/Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response)) #1 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response)) #2 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) #3 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() #4 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Promise\TaskQueue->run(true) #5 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() #6 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() #7 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() #8 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() #9 /srv/wp-content/plugins/gcs/vendor/guzzlehttp/guzzle/src/Client.php(106): GuzzleHttp\Promise\Promise->wait() #10 /srv/wp-content/plugins/gcs/vendor/google/auth/src/HttpHandler/Guzzle6HttpHandler.php(34): GuzzleHttp\Client->send(Object(GuzzleHttp\Psr7\Request), Array) #11 [internal function]: Google\Auth\HttpHandler\Guzzle6HttpHandler->__invoke(Object(GuzzleHttp\Psr7\Request), Array) #12 /srv/wp-content/plugins/gcs/gcs.php(134): call_user_func_array(Object(Google\Auth\HttpHandler\Guzzle6HttpHandler), Array) #13 [internal function]: Google\Cloud\Storage\WordPress\{closure}(Object(GuzzleHttp\Psr7\Request), Array) #14 /srv/wp-content/plugins/gcs/vendor/google/cloud-core/src/ExponentialBackoff.php(74): call_user_func_array(Object(Closure), Array) #15 /srv/wp-content/plugins/gcs/vendor/google/cloud-core/src/RequestWrapper.php(166): Google\Cloud\Core\ExponentialBackoff->execute(Object(Closure), Array) #16 /srv/wp-content/plugins/gcs/vendor/google/cloud-core/src/RestTrait.php(95): Google\Cloud\Core\RequestWrapper->send(Object(GuzzleHttp\Psr7\Request), Array) #17 /srv/wp-content/plugins/gcs/vendor/google/cloud-storage/src/Connection/Rest.php(195): Google\Cloud\Storage\Connection\Rest->send('objects', 'get', Array) #18 /srv/wp-content/plugins/gcs/vendor/google/cloud-storage/src/StorageObject.php(1123): Google\Cloud\Storage\Connection\Rest->getObject(Array) #19 /srv/wp-content/plugins/gcs/vendor/google/cloud-storage/src/StorageObject.php(1074): Google\Cloud\Storage\StorageObject->reload(Array) #20 /srv/wp-content/plugins/gcs/vendor/google/cloud-storage/src/StreamWrapper.php(583): Google\Cloud\Storage\StorageObject->info() #21 /srv/wp-content/plugins/gcs/vendor/google/cloud-storage/src/StreamWrapper.php(488): Google\Cloud\Storage\StreamWrapper->urlStatFile() #22 [internal function]: Google\Cloud\Storage\StreamWrapper->url_stat('gs://xxx-news....', 2) #23 /srv/wp-includes/functions.php(1922): file_exists('gs://xxx-news....') #24 /srv/wp-includes/functions.php(2254): wp_mkdir_p('gs://xxx-news....') #25 /srv/wp-admin/includes/file.php(837): wp_upload_dir('2019-11-20 11:1...') #26 /srv/wp-admin/includes/file.php(953): _wp_handle_upload(Array, Array, '2019-11-20 11:1...', 'wp_handle_uploa...') #27 /srv/wp-admin/includes/media.php(301): wp_handle_upload(Array, Array, '2019-11-20 11:1...') #28 /srv/wp-admin/async-upload.php(93): media_handle_upload('async-upload', 0) #29 /srv/gae-app.php(53): require('/srv/wp-admin/a...') #30 {main} thrown in /srv/wp-content/plugins/gcs/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113
I suppose i'm missing something on my ACL permission but i don't have idea how to proceed
Thanks!
GCS 0.1.5 present bugs on media loading
I have used instead 0.1.4
https://github.com/GoogleCloudPlatform/wordpress-plugins/issues/68