Getting Some transactions have not been committed or rolled back in magento 2.3.2 EE while the order is placing - magento2

PHP Fatal error: Uncaught Exception: User Error: Some transactions have not been committed or rolled back in /var/www/html/vype/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 3981 in /var/www/html/vype/vendor/magento/framework/App/ErrorHandler.php:61

There are two ways to figure out the cause:
check your log file to see the real error
change your magento to developer mode and enable debugging.
Add this to your index.php and pub/index.php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
Then try to reproduce the error again and you should see more information now.
For example I got this message:
TypeError: Argument 1 passed to
Amasty\AdminActionsLog\Observer\HandleModelSaveBefore::prepareProductOptionsDataAsArray()
must be of the type array, null given
So for me the third party extension Amasty\AdminActionsLog caused the bug.

Related

How do I enable Error Reporting in TYPO3?

I have made a contact form but upon submitting it I get the error: Oops, an error occurred! Code: 201905310232036dfcc153.
I would like to get more information so I can start debugging. So my question is: How do I enable error reporting in TYPO3?
You have to add this line in your TypoScript
config.contentObjectExceptionHandler = 0
After setting to 0, you will see detailed errors in frontend when an exception
is thrown.
To reset it, simply delete the lin or set to 1.
here is a blog post from me about it (in German): https://www.naderio.de/oops-an-error-occurred-komplette-fehlermeldung-anzeigen/
In the directory typo3temp/var/logs/ there should be a file named typo3_somehash.log. Search this file for the error code.
Go to Install Tool and configure SYS|displayErrors = 1
This enables the debug exception handler and you will get a stacktrace instead oops an error occurred.
You can also write it directly in your typo3conf/AdditionalConfiguration.php or typo3conf/LocalConfiguration.php:
$GLOBALS['TYPO3_CONF_VARS'][SYS]['displayErrors'] = 1;
See also: https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/ErrorAndExceptionHandling/Configuration/Index.html

Empty pagetree in TYPO3 7.2 backend

I am setting up a web portal using TYPO3 version 7.2. I successfully installed TYPO3 following this article on a Red Hat 4.8.2-16 machine. Everything worked fine and I created some pages until for some reason the pagetree didn't show any content any more. So now the backend looks like this http://goo.gl/3p0uQn
My browsers debug console only returns this error:
TypeError: TYPO3ViewportInstance.DebugConsole is null backend.php:79:5
but I have no idea if this is related to the empty pagetree.
This occurs on Firefox, Chrome and IE, so I guess it has nothing to do with the browser.
Also, I am logged in as an admin so it should not be due to wrong access rights.
Does anybody know what's going on there?
UPDATE:
The TYPO3 Log gives me some PHP Warnings
Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /var/www/typo3_src-7.2.0/typo3/sysext/core/Classes/Http/AjaxRequestHandler.php line 255
Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /var/www/typo3_src-7.2.0/typo3/sysext/core/Classes/Http/AjaxRequestHandler.php line 250
Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /var/www/typo3_src-7.2.0/typo3/sysext/core/Classes/Core/Bootstrap.php line 1193
Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /var/www/typo3_src-7.2.0/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php line 439
Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /var/www/typo3_src-7.2.0/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php line 438
Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /var/www/typo3_src-7.2.0/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php line 425
Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /var/www/typo3_src-7.2.0/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php line 424
UPDATE 2
Meanwhile I installed 7.2 completely fresh (even with a new database) and I still get an empty pagetree. I also tried 6.2 LTS, but also here, no pagetree. I'm beginning to think that there is a problem with my PHP settings. Im using PHP 5.6.9 and MariaDB 10.0.19.
Try tu put that on your php.ini :
always_populate_raw_post_data = -1
It worked for me.
Have a nice day.
Raf
You have a PHP error somewhere. Please check your webserver log or php log for error messages. You can also show the error messages by choosing the development preset in the Install Tool or by setting the context environment variable to Development.
Make sure to clear the cache via Install Tool at least once (Important Actions).

in wordpress, a valid callback for cp_admin_init and _canonical_charset

I'm using WordPress 3.5 with child-theme of Twenty Eleven 1.5. Suddenly I'm getting following Warning,
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'cp_admin_init' was given in /home/templ/public_html/wp-includes/plugin.php on line 406
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '_canonical_charset' was given in /home/templ/public_html/wp-includes/plugin.php on line 173
I'm using following plugins:
download-manager 2.3.9
wordpress-seo 1.4.7
wp-pagenavi 2.83
Some more points:
1) If I'm giving mysite.com it's giving above 2 line warning. If I give www.mysite.com, the following line also include,
Warning: Cannot modify header information - headers already sent by (output started at /home/templ/public_html/wp-includes/plugin.php:406) in /home/templ/public_html/wp-includes/pluggable.php on line 876
2) If I give mysite.com/wp-admin/ or www.mysite.com/wp-admin/, It's giving 1st warning and 3rd warning.
3) If I goto www.mysite.com/wp-login.php, It's giving following 5 warning.
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'cp_admin_init' was given in /home/templ/public_html/wp-includes/plugin.php on line 406
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, '_canonical_charset' was given in /home/templ/public_html/wp-includes/plugin.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/templ/public_html/wp-includes/plugin.php:406) in /home/templ/public_html/wp-login.php on line 368
Warning: Cannot modify header information - headers already sent by (output started at /home/templ/public_html/wp-includes/plugin.php:406) in /home/templ/public_html/wp-login.php on line 380
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'wp_authenticate_spam_check' was given in /home/templ/public_html/wp-includes/plugin.php on line 173
4) If I give correct username and password, it's not going to login. giving following problem,
ERROR: Invalid username or incorrect password.
ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.
I'm trying to find solution. I can't. Can any-one help me?
This sounds like a corrupted install. So you have a few options to fix this:
Attempt to get logins operational again and doing an upgrade though the wp-admin: Explained Below.
Do a manual Update: http://codex.wordpress.org/Updating_WordPress#Manual_Update
But First: Make a Backup
Please be sure to backup your install! Before proceeding: http://codex.wordpress.org/WordPress_Backups
Getting Logins Working: Masking the symptoms
First I would disable debugging output because that should fix most of these issues. When a warning occurs in Wordpress, PHP starts writing the response body and closes the header section of the response. This means that whenever Wordpress tries to add another header after the original warning was raised, PHP will raise another warning:
Warning: Cannot modify header information - headers already sent by (output started at /home/templ/public_html/wp-includes/plugin.php:406) in /home/templ/public_html/wp-login.php on line 380
So if we disable debugging then we should be able to mask the symptoms. This is a quick patch for a larger problem that we will have to solve with an in-place upgrade
To Disable Debugging
Ensure that the following constants exist and are set correctly is in your wp-config.php file
define('WP_DEBUG', false);
and
define('WP_DEBUG_DISPLAY', false);
Now you should be able to login to your site as an administrator without errors.
Disable your Plugins
Disable all your plugins in Plugins -> Installed Plugins This is imperative so that we can make sure that the update goes smoothly.
Do an Update
Go to Dashboard -> Updates and click either Update Now or Re-install Now
Reactivate your Plugins
Reactivate all your plugins in Plugins -> Installed Plugins and update them if necessary.
That's It
That's the process for reinstalling Wordpress. The key here is that you have Debugging enabled on a production site which is not good. You should always have WP_DEBUG and WP_DEBUG_DISPLAY set to false in a production environment.

symfony2 php codesniffer standard error

I'm new to phpCodeSniffer and I'm trying to integrate it with eclipse. I've downloaded phpCodeSniffer from PEAR following these instructions, and I also downloaded Symfony2 standards from Github and the php-cs-fixer. I followed all the instructions and everything works fine, but when I try to use the sniffer with eclipse I get the following error:
/usr/bin/php -c /tmp/zend_debug/session7507717624755069136.tmp -d asp_tags=off -d short_open_tag=on /opt/eclipse/plugins/org.phpsrc.eclipse.pti.tools.codesniffer_1.3.0.R20111119000000/php/tools/phpcs.php --report=xml --standard=/usr/share/php/PHP/CodeSniffer/Standards/Symfony2 --tab-width=4 /var/www/siga-nuevo/src/Siga/UserBundle/Controller/UserController.php
PHP Fatal error: Uncaught exception 'PHP_CodeSniffer_Exception' with message 'Referenced sniff Symfony2.Commenting.FunctionComment.MissingParamComment does not exist' in /opt/eclipse/plugins/org.phpsrc.eclipse.pti.library.pear_1.2.2.R20120127000000/php/library/PEAR/PHP/CodeSniffer.php:814
Stack trace:
0 /opt/eclipse/plugins/org.phpsrc.eclipse.pti.library.pear_1.2.2.R20120127000000/php/library/PEAR/PHP/CodeSniffer.php(730): PHP_CodeSniffer->_expandRulesetReference(Object(SimpleXMLElement))
1 /opt/eclipse/plugins/org.phpsrc.eclipse.pti.library.pear_1.2.2.R20120127000000/php/library/PEAR/PHP/CodeSniffer.php(623): PHP_CodeSniffer->getSniffFiles('/usr/share/php/...', 'Symfony2')
2 /opt/eclipse/plugins/org.phpsrc.eclipse.pti.library.pear_1.2.2.R20120127000000/php/library/PEAR/PHP/CodeSniffer.php(438): PHP_CodeSniffer->setTokenListeners('/usr/share/php/...', Array)
3 /opt/eclipse/plugins/org.phpsrc.eclipse.pti.library.pear_1.2.2.R20120127000000/php/library/PEAR/PHP/CodeSniffer/CLI.php(551): PHP_CodeSniffer->process(Array, '/usr/ in /opt/eclipse/plugins/org.phpsrc.eclipse.pti.library.pear_1.2.2.R20120127000000/php/library/PEAR/PHP/CodeSniffer.php on line 814
This is my eclipse configuration:
It looks like the OpenSky symfony2 standards are broken in your case. The relevant part of the error message is this one:
Uncaught exception 'PHP_CodeSniffer_Exception' with message 'Referenced sniff Symfony2.Commenting.FunctionComment.MissingParamComment does not exist'
As symfony follows all the current PSR standards - namely the PSR-0, PSR-1, PSR-2 and PSR-3 (of which PSR-3 provides just the logger interface which monolog respects).
You can aswell directly use the PSR-2 standard included with newer Versions of PHPCS.
The PSR-2 standard implementation in PHPCS has been updated recently - opposite to those old symfony2 standards. Which means the implementation should be more accurate anyway.

Warning: curl_setopt() [function.curl-setopt]: Invalid curl configuration option in facebook_base.php

A week ago I started to notice a problem with the php sdk file - facebook_base.php
sometimes when connected facebook member visit the site and the auto-login trigger I get 2 errors and sometimes only the first error (that is why I used it in my problem title)+ the site shows up but without showing that user is connected.
after a refresh no error is shown and the site for connected member shows up.
I've tried new version of php API and also old ones that worked and still problem remained.
any ideas what can cause the problem?
UPDATE: similar problem spotted here: https://developers.facebook.com/bugs/207087046099691?browse=search_512a0e37e7ecf6136191651
this is the errors:
Warning: curl_setopt() [function.curl-setopt]: Invalid curl configuration option in /home/admin/domains/mydomain.com/public_html/includes/base_facebook.php on line 970
Warning: curl_setopt_array() [function.curl-setopt-array]: Array keys must be CURLOPT constants or equivalent integer values in /home/admin/domains/mydomain.com/public_html/includes/base_facebook.php on line 946