PIMCORE: getting 500 Error, Grid column configuration with objectbricks - php

Getting Below Error in PIMCORE demo Site
Senario: product grid adding new objectBricks Column and try to sort by id
Status: 500 | Internal Server Error
URL: /admin/object/grid-proxy/classId/12/folderId/33?xaction=read&_dc=1491992052100
Params:
-> language: en_GB
-> class: Product
Fatal error: Uncaught exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli prepare error: Column 'o_id' in order clause is ambiguous' in /home/pimcore_ecommercedemo/www/vendor/zendframework/zendframework1/library/Zend/Db/Statement/Mysqli.php:77
Stack trace:
#0 /home/pimcore_ecommercedemo/www/vendor/zendframework/zendframework1/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('SELECT COUNT(*)...')
#1 /home/pimcore_ecommercedemo/www/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Mysqli.php(388): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'SELECT COUNT(*)...')
#2 /home/pimcore_ecommercedemo/www/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Adapter_Mysqli->prepare('SELECT COUNT(*)...')
#3 /home/pimcore_ecommercedemo/www/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Abstract.php(828): Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Select), Array)
#4 [internal function]: Zend_Db_Adapter_Abstract->fetchOne in /home/pimcore_ecommercedemo/www/vendor/zendframework/zendframework1/library/Zend/Db/Statement/Mysqli.php on line 77
Related issue on github:
https://github.com/pimcore/pimcore/issues/1439

This sounds like a JOIN problem. When two tables have similar columns, (i.e. o_id), MySQL is not sure which column you mean. You have to specify tablename.o_id in order to get rid of this ambiguity error message.

Please ckeck solution for below link.
Solution : https://github.com/pimcore/pimcore/issues/1439

Related

WPForms Lite error: Uncaught RuntimeException: Extraction failed: variable names are clashing with the existing ones

WPForms Lite has caused a fatal error on my WordPress page, and I struggle with figuring out what the problem is and how to fix it.
Error Details:
An error of type E_ERROR was caused in line 106 of the file /home/pagename/public_html/wp-content/plugins/wpforms-lite/src/Helpers/Templates.php. Error message: Uncaught RuntimeException: Extraction failed: variable names are clashing with the existing ones. in /home/pagename/public_html/wp-content/plugins/wpforms-lite/src/Helpers/Templates.php:106
It seems like the function is supposed to include a template, and the error exists to "protect the scope from modification".
Stack trace:
#0 /home/pagename/public_html/wp-content/plugins/wpforms-lite/src/Helpers/Templates.php(127): WPForms\Helpers\Templates::include_html('education/admin...', Array, true)
#1 /home/pagename/public_html/wp-content/plugins/wpforms-lite/includes/functions.php(2402): WPForms\Helpers\Templates::get_html('education/admin...', Array, true)
#2 /home/pagename/public_html/wp-content/plugins/wpforms-lite/src/Lite/Admin/Education/Admin/NoticeBar.php(69): wpforms_render('education/admin...', Array, true)
#3 /home/pagename/public_html/wp-includes/class-wp-hook.php(303): WPForms\Lite\Admin\Education\Admin\NoticeBar->display('')
#4 /home/pagename/public_html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)
#5 /home/vpagename/public_html/wp-includes/plugin.php(470): WP_Hook->do_action(Arra

Error handlers in neo4j-php-client

I downloaded and installed neo4j-php-client and neo4j 2.3.2. Actually all works fine, but I just wondering why there is no error handlers in this php client? For example if there is an error in cypher query, no error has throwing to be easy to catch it. I searching through the network, but I can't found a solution.
Do anybody have an idea how to turn on error handlers?
Thanks in advance.
I'm the maintainer of neo4j-php-client.
When you send a query to Neo4j, it is actually sent via Guzzle.
Of course there is a try/catch block for handling exceptions, which is located here :
https://github.com/graphaware/neo4j-php-client/blob/master/src/HttpClient/GuzzleHttpClient.php#L76
If there is an error in your cypher query, an exception will be thrown of course, the exception is of type Neo4jException (https://github.com/graphaware/neo4j-php-client/blob/master/src/Exception/Neo4jException.php)
Here is a simple code with a cypher syntax error and you can see an exception is thrown :
<?php
require_once __DIR__ .'/vendor/autoload.php';
use Neoxygen\NeoClient\ClientBuilder;
$client = ClientBuilder::create()
->addConnection('default', 'http', 'localhost', 7474)
->setAutoFormatResponse(true)
->build();
$query = 'MATCH (n) RETURN x';
$result = $client->sendCypherQuery($query)->getResult();
-
ikwattro#graphaware ~/d/g/p/neo4j-php-client> php test.php
PHP Fatal error: Uncaught Neoxygen\NeoClient\Exception\Neo4jException: Neo4j Exception with code "Neo.ClientError.Statement.InvalidSyntax" and message "Variable `x` not defined (line 1, column 18 (offset: 17))
"MATCH (n) RETURN x"
^" in /Users/ikwattro/dev/graphaware/php/neo4j-php-client/src/Extension/AbstractExtension.php:117
Stack trace:
#0 /Users/ikwattro/dev/graphaware/php/neo4j-php-client/src/Extension/AbstractExtension.php(104): Neoxygen\NeoClient\Extension\AbstractExtension->checkResponseErrors(Array)
#1 /Users/ikwattro/dev/graphaware/php/neo4j-php-client/src/Extension/NeoClientCoreExtension.php(98): Neoxygen\NeoClient\Extension\AbstractExtension->handleHttpResponse(Object(Neoxygen\NeoClient\Request\Response))
#2 [internal function]: Neoxygen\NeoClient\Extension\NeoClientCoreExtension->sendCypherQuery('MATCH (n) RETUR...')
#3 /Users/ikwattro/dev/graphaware/php/neo4j-php-client/src/Extension/ExtensionManager.php(53): call_user_func_array(Array, Array)
#4 /Users/ikwattro/dev/graphaware/php/neo4j-php-cli in /Users/ikwattro/dev/graphaware/php/neo4j-php-client/src/Extension/AbstractExtension.php on line 117
Fatal error: Uncaught Neoxygen\NeoClient\Exception\Neo4jException: Neo4j Exception with code "Neo.ClientError.Statement.InvalidSyntax" and message "Variable `x` not defined (line 1, column 18 (offset: 17))
"MATCH (n) RETURN x"
^" in /Users/ikwattro/dev/graphaware/php/neo4j-php-client/src/Extension/AbstractExtension.php:117
Stack trace:
#0 /Users/ikwattro/dev/graphaware/php/neo4j-php-client/src/Extension/AbstractExtension.php(104): Neoxygen\NeoClient\Extension\AbstractExtension->checkResponseErrors(Array)
#1 /Users/ikwattro/dev/graphaware/php/neo4j-php-client/src/Extension/NeoClientCoreExtension.php(98): Neoxygen\NeoClient\Extension\AbstractExtension->handleHttpResponse(Object(Neoxygen\NeoClient\Request\Response))
#2 [internal function]: Neoxygen\NeoClient\Extension\NeoClientCoreExtension->sendCypherQuery('MATCH (n) RETUR...')
#3 /Users/ikwattro/dev/graphaware/php/neo4j-php-client/src/Extension/ExtensionManager.php(53): call_user_func_array(Array, Array)
#4 /Users/ikwattro/dev/graphaware/php/neo4j-php-cli in /Users/ikwattro/dev/graphaware/php/neo4j-php-client/src/Extension/AbstractExtension.php on line 117
Thanks for the answer. The problem is seems on my end, I figured out after few tests - Error hanldering overwrites by the php framework.

SQL Storage in OpenVBX (Twilio)

I'm writing a plugin for openVBX.
I need to store some stuff in a table I made in the OpenVBX database.
OpenVBX Provides a helper method (PluginData::sqlQuery) to run queries but no way to escape them, so I decided to open a new PDO connection in my plugin page, but I'm getting this error:
Fatal error: Uncaught exception 'PDOException' with message
'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in
/home/elitecallcenter/public_html/ivr/plugins/QPage/qpage.php:119
Stack trace: #0
/home/elitecallcenter/public_html/ivr/plugins/QPage/qpage.php(119):
PDOStatement->execute(Array) #1
/home/elitecallcenter/public_html/ivr/OpenVBX/views/page/index.php(7):
include_once('/home/elitecall...') #2
/home/elitecallcenter/public_html/ivr/system/libraries/Loader.php(677):
include('/home/elitecall...') #3
/home/elitecallcenter/public_html/ivr/system/libraries/Loader.php(307):
CI_Loader->_ci_load(Array) #4
/home/elitecallcenter/public_html/ivr/OpenVBX/libraries/Template.php(388):
CI_Loader->view('page/index', Array, true) #5
/home/elitecallcenter/public_html/ivr/OpenVBX/libraries/MY_Controller.php(455):
CI_Template->write_view('content', 'page/index', Array) #6
/home/elitecallcenter/public_html/ivr/OpenVBX/libraries/MY_Controller.php(498):
MY_Controller->template_respond('Phone Apps', 'page/index', Array, 'yu
in /home/elitecallcenter/public_html/ivr/plugins/QPage/qpage.php on
line 119
Line 119 is my execute call for a prepared statement.
How can I resolve this?
How large / heavy is the query? Generally you get MySQL server has gone away as a timeout.
You could try raising 'wait_timeout' in my.cnf to something more suitable or try raising 'max_allowed_packet' to '128M'.
I figured out that it was written in codeigniter, so I'm reading up on that to figure out the best way to do this. In the mean time, I've got a functioning workaround set up that involves making a cURL request to another script in the base directory that is able to connect to the database.

Wordpress plugin fatal error

I downloaded this taxi booking plugin from Github but when I try to activate it on wordpress I get a fatal error and it doesn't let me activate it. You can find the plugin on https://github.com/mbejda/TaxiCabBookingSystem
Fatal error: Uncaught exception 'Braintree_Exception_Configuration' with message 'merchantIdneeds to be set' in /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php:117 Stack trace: #0 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php(139): Braintree_Configuration::get('merchantId') #1 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php(157): Braintree_Configuration::setOrGet('merchantId', NULL) #2 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/modules/BookingSystemBrainTreeModule.php(32): Braintree_Configuration::merchantId(NULL) #3 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/main.php(177): BookingSystemBrainTreeModule->__construct(Object(BookingSystem)) #4 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-maste in /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php on line 117
Any help to get this resolved would be appreciated.
UPDATE at Sunday 8th Feb # 8:18pm.
I have added the Merchant ID on Configuration.php its giving me the same error I think, if not the same then very simular
Fatal error: Uncaught exception 'Braintree_Exception_Configuration' with message 'publicKeyneeds to be set' in /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php:117 Stack trace: #0 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php(139): Braintree_Configuration::get('publicKey') #1 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php(162): Braintree_Configuration::setOrGet('publicKey', NULL) #2 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/modules/BookingSystemBrainTreeModule.php(33): Braintree_Configuration::publicKey(NULL) #3 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/main.php(177): BookingSystemBrainTreeModule->__construct(Object(BookingSystem)) #4 /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/ma in /Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php on line 117
Regards
Did you read the error message output... it says
Message 'merchantId needs to be set' in
/Applications/MAMP/htdocs/DocklandsTaxi/wp-content/plugins/TaxiCabBookingSystem-master/lib/Braintree/Configuration.php
[Update]
Also check out https://www.braintreepayments.com/docs/php

Integrating Search-SphinxsearchBundle into Symfony

I'm using Symfony-standard,
I have installed Search-SphinxsearchBundle
I was assuming, i would use it's services in controller, to fetch documentation in my app/Resources/docs, where there's index.srt, I need to know how to direct the bundle to search from my folder.
I want to use it to query my index.srt documentations in app/Resources/docs.
I'm stuck on app/config/config.yml
sphinxsearch:
indexes:
- name: books
index:
- %sphinxsearch_index_books%
field_weights:
label: 10
content: 5
I'm getting this error:
Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException'
with message 'You have requested a non-existent parameter "sphinxsearch_index_pages".'
in /usr/local/dev/hris/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php:108 Stack trace:
#0 /usr/local/dev/hris/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php(234): Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->get('sphinxsearch_in...')
#1 /usr/local/dev/hris/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php(205): Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->resolveString('%sphinxsearch_i...', Array)
#2 /usr/local/dev/hris/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php(195): Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->resolveValue('%sphinxsearch_i...', Array)
#3 /usr/local/dev/hris/vendo in /usr/local/dev/hris/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php on line 108

Categories