A few weeks ago I had a server crash, and had no real backups so everything had to be recovered manually. One of those things was a Magento store. I've got all of the files and database restored, however now when I try to go through the checkout process to test I get errors.
I can either click to register when checking out, then when I click 'Continue' on the checkout page I get a 'Loading next step' message then some kind of AJAX error in the Chrome network inspector when trying to access the saveBilling page. The error is listed below:
Notice: Undefined variable: nameGroupAttribute in /var/www/vhosts/mysite.com/httpdocs/app/code/local/Amasty/Customerattr/Model/Rewrite/Checkout/Type/Onepage.php on line 41
#0 /var/www/vhosts/mysite.com/httpdocs/app/code/local/Amasty/Customerattr/Model/Rewrite/Checkout/Type/Onepage.php(41): mageCoreErrorHandler(8, 'Undefined varia...', '/var/www/vhosts...', 41, Array)
#1 /var/www/vhosts/mysite.com/httpdocs/app/code/core/Mage/Checkout/controllers/OnepageController.php(307): Amasty_Customerattr_Model_Rewrite_Checkout_Type_Onepage->saveBilling(Array, false)
#2 /var/www/vhosts/mysite.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Checkout_OnepageController->saveBillingAction()
#3 /var/www/vhosts/mysite.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('saveBilling')
#4 /var/www/vhosts/mysite.com/httpdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#5 /var/www/vhosts/mysite.com/httpdocs/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#6 /var/www/vhosts/mysite.com/httpdocs/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#7 /var/www/vhosts/mysite.com/httpdocs/index.php(85): Mage::run('', 'store')
#8 {main}
I've searched every possible combination of words that I can think of and have come up empty. This site was setup before I arrived at this company so I have no idea if anything was changed that shouldn't have been. All I know is the site was working before the server went down, and now this part doens't work.
Thanks for any help!
Related
After updating the wp-core, wpml plugin the other language link stopped working, after this, we contacted the support, and tried to roll back everything, and nothing helps
We noticed the conflict between two plugins WPML and Custom Post Type UI.
We started getting this Fatal Error:
Fatal error: Uncaught ValueError: Missing format specifier at end of string in /home/itdspl/domains/itds.tld/public_html/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php:416 Stack trace: #0 /home/itdspl/domains/itds.tld/public_html/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php(416): sprintf('Nigdy wi\xC4\x99cej %', 'Case Study') #1 /home/itdspl/domains/itds.tld/public_html/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php(320): cptui_register_single_post_type(Array) #2 /home/itdspl/domains/itds.tld/public_html/wp-includes/class-wp-hook.php(308): cptui_create_custom_post_types('') #3 /home/itdspl/domains/itds.tld/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #4 /home/itdspl/domains/itds.tld/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 /home/itdspl/domains/itds.tld/public_html/wp-settings.php(617): do_action('init') #6 /home/itdspl/domains/itds.tld/public_html/wp-config.php(198): require_once('/home/itdspl/do...') #7 /home/itdspl/domains/itds.tld/public_html/wp-load.php(50): require_once('/home/itdspl/do...') #8 /home/itdspl/domains/itds.tld/public_html/wp-blog-header.php(13): require_once('/home/itdspl/do...') #9 /home/itdspl/domains/itds.tld/public_html/index.php(17): require('/home/itdspl/do...') #10 {main} thrown in /home/itdspl/domains/itds.tld/public_html/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php on line 416
How it can be resolved? From where should I start or what to do?
What is an idiot minus to this question??? The problem was not in the plugin code!
After days of searching for the issue and talking to support, I found an issue in String Translation for plugins.
We haven't translated the Custom Post Type UI plugin, and we found that from 400 lines of strings only one was translated and it caused the issue.
No %s Found >>>> Nie %
So this % at the end of the string was the main problem. Obviously that this sign "%" it's incorrect for the code to be in the end. I don't know how that happened since we didn't do this, but probably some issues after updating.
So, be aware, that it could be a really small thing and actually not obvious to check. We searched really deeply since we couldn't see any fatal errors even with a debug mode.
Please find below Stack Trace I pasted from apache error logs.
An Error occurred while handling another error:\nyii\\web\\HeadersAlreadySentException: Headers already sent. in /var/www/html/staging_v2/vendor/yiisoft/yii2/web/Response.php:373\nStack trace:\n#0
/var/www/html/staging_v2/vendor/yiisoft/yii2/web/Response.php(346): yii\\web\\Response->sendHeaders()\n#1
/var/www/html/staging_v2/vendor/yiisoft/yii2/web/ErrorHandler.php(136): yii\\web\\Response->send()\n#2
/var/www/html/staging_v2/vendor/yiisoft/yii2/base/ErrorHandler.php(135): yii\\web\\ErrorHandler->renderException(Object(yii\\base\\ErrorException))\n#3
[internal function]: yii\\base\\ErrorHandler->handleException(Object(yii\\base\\ErrorException))\n#4
{main}\nPrevious exception:\nyii\\base\\ErrorException: strpos(): Empty needle in /var/www/html/staging_v2/vendor/yiisoft/yii2/i18n/PhpMessageSource.php:111\nStack trace:\n#0
[internal function]: yii\\base\\ErrorHandler->handleError(2, 'strpos(): Empty...', '/var/www/html/s...', 111, Array)\n#1
/var/www/html/staging_v2/vendor/yiisoft/yii2/i18n/PhpMessageSource.php(111): strpos('en-US', '')\n#2
/var/www/html/staging_v2/vendor/yiisoft/yii2/i18n/PhpMessageSource.php(78): yii\\i18n\\PhpMessageSource->loadFallbackMessages('yii', '', NULL, '/var/www/html/s...')\n#3 /var/www/html/staging_v2/vendor/yiisoft/yii2/i18n/MessageSource.php(107): yii\\i18n\\PhpMessageSource->loadMessages('yii', NULL)\n#4
/var/www/html/staging_v2/vendor/yiisoft/yii2/i18n/MessageSource.php(87): yii\\i18n\\MessageSource->translateMessage('yii', '{attribute} can...', NULL)\n#5
/var/www/html/staging_v2/vendor/yiisoft/yii2/i18n/I18N.php(90): yii\\i18n\\MessageSource->translate('yii', '{attribute} can...', NULL)\n#6
/var/www/html/staging_v2/vendor/yiisoft/yii2/BaseYii.php(538): yii\\i18n\\I18N->translate('yii', '{attribute} can...', Array, NULL)\n#7
/var/www/html/staging_v2/vendor/yiisoft/yii2/validators/RequiredValidator.php(62): yii\\BaseYii::t('yii', '{attribute} can...')\n#8
/var/www/html/staging_v2/vendor/yiisoft/yii2/base/BaseObject.php(109): yii\\validators\\RequiredValidator->init()\n#9
[internal function]: yii\\base\\BaseObject->__construct(Array)\n#10
/var/www/html/staging_v2/vendor/yiisoft/yii2/di/Container.php(420): ReflectionClass->newInstanceArgs(Array)\n#11
/var/www/html/staging_v2/vendor/yiisoft/yii2/di/Container.php(171): yii\\di\\Container->build('yii\\\\validators\\\\...', Array, Array)\n#12
/var/www/html/staging_v2/vendor/yiisoft/yii2/BaseYii.php(365): yii\\di\\Container->get('yii\\\\validators\\\\...', Array, Array)\n#13
/var/www/html/staging_v2/vendor/yiisoft/yii2/validators/Validator.php(231): yii\\BaseYii::createObject(Array)\n#14
/var/www/html/staging_v2/vendor/yiisoft/yii2/base/Model.php(469): yii\\validators\\Validator::createValidator('yii\\\\validators\\\\...', Object(frontend\\models\\ContactForm), Array, Array)\n#15 /var/www/html/staging_v2/vendor/yiisoft/yii2/base/Model.php(421): yii\\base\\Model->createValidators()\n#16
/var/www/html/staging_v2/vendor/yiisoft/yii2/base/Model.php(190): yii\\base\\Model->getValidators()\n#17
/var/www/html/staging_v2/vendor/yiisoft/yii2/base/Model.php(817): yii\\base\\Model->scenarios()\n#18
/var/www/html/staging_v2/vendor/yiisoft/yii2/base/Model.php(435): yii\\base\\Model->activeAttributes()\n#19
/var/www/html/staging_v2/vendor/yiisoft/yii2/base/Model.php(495): yii\\base\\Model->getActiveValidators('name')\n#20
/var/www/html/staging_v2/vendor/yiisoft/yii2/widgets/ActiveField.php(929): yii\\base\\Model->isAttributeRequired('name')\n#21
/var/www/html/staging_v2/vendor/yiisoft/yii2/widgets/ActiveField.php(405): yii\\widgets\\ActiveField->addAriaAttributes(Array)\n#22
/var/www/html/staging_v2/frontend/views/site/index.php(143): yii\\widgets\\ActiveField->textInput(Array)\n#23
/var/www/html/staging_v2/vendor/yiisoft/yii2/base/View.php(348): require('/var/www/html/s...')\n#24
/var/www/html/staging_v2/vendor/yiisoft/yii2/base/View.php(257): yii\\base\\View->renderPhpFile('/var/www/html/s...', Array)\n#25
/var/www/html/staging_v2/vendor/yiisoft/yii2/web/View.php(213): yii\\base\\View->renderFile('/var/www/html/s...', Array, Object(frontend\\controllers\\SiteController))\n#26 /var/www/html/staging_v2/vendor/yiisoft/yii2/web/Controller.php(53): yii\\web\\View->renderAjax('index', Array, Object(frontend\\controllers\\SiteController))\n#27 /var/www/html/staging_v2/frontend/controllers/SiteController.php(555): yii\\web\\Controller->renderAjax('index', Array)\n#28
[internal function]: frontend\\controllers\\SiteController->actionIndex()\n#29
/var/www/html/staging_v2/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)\n#30
/var/www/html/staging_v2/vendor/yiisoft/yii2/base/Controller.php(181): yii\\base\\InlineAction->runWithParams(Array)\n#31
/var/www/html/staging_v2/vendor/yiisoft/yii2/base/Module.php(534): yii\\base\\Controller->runAction('index', Array)\n#32
/var/www/html/staging_v2/vendor/yiisoft/yii2/web/Application.php(104): yii\\base\\Module->runAction('site/index', Array)\n#33
/var/www/html/staging_v2/vendor/yiisoft/yii2/base/Application.php(392): yii\\web\\Application->handleRequest(Object(yii\\web\\Request))\n#34
/var/www/html/staging_v2/frontend/web/index.php(0): yii\\base\\Application->run()\n#35
You can find the issue here: https://staging-v2.storna.app
Admin Portal works https://staging-v2.storna.app/admin
API works too
Only landing pages have an issue.. it was working fine earlier.
What could be the issue?
There are only 2 issues in log. and 1 of which is warning and another is just a php7 notice. so I doubt it is due to this.
You seem to be using 2.0.40 version and this was already reported here. It seems the Problem only exists on PHP Version 7.1 - 7.4 as PHP 8.0 seems to pass successful with the reason being
Looks like the previous versions were resilient to language being set to null
You can either change your minimum-stability settings in the composer.json from stable to dev, and run composer update to update your yii framework to dev-master.
Or you can manually update those files only from this commit
I would use the second option as the first one will update all the packages too.
I'm working on a project with Zend Framework 2.4.13, and I have to retrieve mails from an imap
mailbox. For this purpose I use \Zend\Mail\Storage\Imap:
foreach ($this->imap as $index => $message) {
// ...
}
It's working well, except for a particular mail which fails to parse. The From header is invalid
because it contains raw UTF-8 characters (french accents):
From: "Stéph" <abc#def.fr>
Then I get the following Zend error:
An error occurred during execution; please try again later.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Informations complémentaires:
Zend\Mail\Header\Exception\InvalidArgumentException
Fichier:
/var/www/project/vendor/zendframework/zendframework/library/Zend/Mail/Header/GenericHeader.php:61
Message:
Invalid header value detected
Pile d'exécution:
#0 /var/www/project/vendor/zendframework/zendframework/library/Zend/Mail/Header/GenericHeader.php(35): Zend\Mail\Header\GenericHeader::splitHeaderLine('From: "St\xC3\xA9ph" ...')
#1 /var/www/project/vendor/zendframework/zendframework/library/Zend/Mail/Headers.php(230): Zend\Mail\Header\GenericHeader::fromString('From: "St\xC3\xA9ph" ...')
#2 /var/www/project/vendor/zendframework/zendframework/library/Zend/Mail/Headers.php(95): Zend\Mail\Headers->addHeaderLine('From: "St\xC3\xA9ph" ...')
#3 /var/www/project/vendor/zendframework/zendframework/library/Zend/Mime/Decode.php(141): Zend\Mail\Headers::fromString('MIME-Version: 1...', '\n')
#4 /var/www/project/vendor/zendframework/zendframework/library/Zend/Mail/Storage/Part.php(106): Zend\Mime\Decode::splitMessage('MIME-Version: 1...', 'MIME-Version: 1...', '')
#5 /var/www/project/vendor/zendframework/zendframework/library/Zend/Mail/Storage/Message.php(54): Zend\Mail\Storage\Part->__construct(Array)
#6 /var/www/project/vendor/zendframework/zendframework/library/Zend/Mail/Storage/Imap.php(118): Zend\Mail\Storage\Message->__construct(Array)
#7 /var/www/project/vendor/zendframework/zendframework/library/Zend/Mail/Storage/AbstractStorage.php(267): Zend\Mail\Storage\Imap->getMessage(1)
#8 /var/www/project/module/Application/src/Application/Helpers/LeadParser/Mail/Inbox.php(52): Zend\Mail\Storage\AbstractStorage->current()
#9 /var/www/project/module/Application/src/Application/Helpers/LeadParser/InboxProcessor.php(81): Application\Helpers\LeadParser\Mail\Inbox->getMails()
#10 /var/www/project/module/Application/src/WebService/Controller/LeadParserController.php(52): Application\Helpers\LeadParser\InboxProcessor->process()
#11 /var/www/project/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php(82): WebService\Controller\LeadParserController->indexAction()
#12 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#13 /var/www/project/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#14 /var/www/project/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 /var/www/project/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#16 /var/www/project/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#17 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#18 /var/www/project/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#19 /var/www/project/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#20 /var/www/project/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#21 /var/www/project/public/index.php(69): Zend\Mvc\Application->run()
#22 {main}
I guess the problems deals about RFC. Accordingly to the
RFC-2822 this header is not valid because of the
UTF-8 characters, and Zend complains about it
when the header is validated.
I saw many issues around this on the web, but most of them talk about email creation, not
reception.
I also saw the RFC-6532 which deals about Internationalized
Email Headers, but the mail doesn't seem to respect this standard (there is no message/global
part).
Actual workaround
The only solution I found for the moment is to use barbushin/php-imap,
a wrapper around native php imap functions. This package seems to be more tolerant/updated, and retrieves
the mail correctly.
Question
I need to find a solution to make the mail reception process more tolerant, in order to accept
such mail headers. But I'm not convinced with my workaround, which adds vendor dependencies for something
already implemented in the framework.
Is it possible to solve this issue directly via the ZF2 framework?
Although RFC 6532 isn't strictly relevant to the problem, implementing reading support for it in ZF2 is probably the simplest way to solve your problem.
This is because 6532 extends the message format to support addresses such as stéph#example.com, and it does so in a way that resembles common behaviour up through the years. People do a lot of inappropriate just-send-8, and the authors of 6532 chose to match the most common type of observed user behaviour. The message you want to read uses just the kind of inappropriate just-send-8 that 6532 codifies and allows.
Adding support for reading 6532-compliant messages should be as simple as editing various syntax checks and letting through more code points. I have some test messages on github; if ZF2 can parse those you'll be able to read and act on the EAI messages real users send.
Acting on messages sent by mailer-daemon requires 6533 support as well, and replying may require more 6532-relevant work. That bit is complex. But reading mail is a useful ability in itself.
Hello Everyone and Podio Development team, I have some issues in podio since few days, I integrate podio in client project and project is in PHP Codeigniter, The podio API's were working before perfectly, but now there are some issues i am getting error The path '/item/basic' was not found.." Request URL: http://api.podio.com/item/basic
Although to verify code, I already checked old codes which was also integrated in podio and they are also not working now since few days. I checked podio website for Podio Items: Get item basic
https://developers.podio.com/doc/items/get-basic-item-61768
this is deprecated but no alternatives are provided and I am getting error regarding this.
When i comment code of podio and website works but when i uncomment code of podio and run it it shows error since few days, I have tried all steps and cross check in case code mistake there is no mistake as same code was working before, old codes also i checked which worked before not worked now. Kindly help me thank you.
Attaching screenshots
Fatal error: Uncaught PodioNotFoundError: "No matching operation could be found. The path '/item/basic' was not found.." Request URL: http://api.podio.com/item/basic Stack Trace: #0 /home/username/public_html/podio-php-4.3.0/lib/Podio.php(351): Podio::request('GET', '/item//basic', Array, Array) #1 /home/username/public_html/podio-php-4.3.0/models/PodioItem.php(120): Podio::get('/item//basic', Array) #2 /home/username/public_html/st_application/controllers/user.php(1459): PodioItem::get_basic(NULL) #3 /home/username/public_html/st_application/controllers/user.php(901): User->podioPropertyCreate(336, Array, Array, Array, Array, '3 Females, 1 Ma...', 'uploads/files/', Array, 'jahanzeb#gmail....') #4 [internal function]: User->add_property('add') #5 /home/username/public_html/st_system/core/CodeIgniter.php(360): call_user_func_array(Array, Array) #6 /home/username/public_html/index.php(202): require_once('/home
/username...') #7 {main} thrown in /home/username/public_html/podio-php-4.3.0/lib/Podio.php on line 324
This is the issue image:
You are not passing the item_id with the API call.
For PodioItem::get_basic API call, the item_id parameter (first parameter) is required one.
Also, please note that this get_basic operation is deprecated and will be removed soon.
Please use Podio Get Item API instead.
Error occurred while sending mail in zend framework.
5.1.3 Invalid address^M
Following error occured:
#
0 /var/test/trunc/library/Zend/Mail/Protocol/Smtp.php(289): Zend_Mail_Protocol_Abstract->_expect(Array, 300)
#1 /var/test/trunc/library/Zend/Mail/Transport/Smtp.php(209): Zend_Mail_Protocol_Smtp->rcpt('')
#2 /var/test/trunc/library/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#3 /var/test/trunc/library/Zend/Mail.php(724): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#4 /var/test/trunc/library/test/Mail.php(71): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
#5 /var/test/trunc/library/test/Mail.php(881): test_Mail->sendEmail(Array)
#6 /var/test/trunc/application/models/TTN.php(379): test_Mail->sendHistory(12882, '<log><message t...')
#7 /var/test/trunc/application/controllers/TTNController.php(96): TTN->end(12882, Array)
#8 /var/test/trunc/library/Zend/Controller/Action.php(502): TTNController->Action()
#9 /var/test/trunc/library/Zend/Controller/Dispatcher/Standard.php(293): Zend_Controller_Action->dispatch('Action')
#10 /var/test/trunc/library/Zend/Controller/Front.php(946): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#11 /var/test/trunc/application/Setup.php(339): Zend_Controller_Front->dispatch()
#12 /var/test/trunc/application/Setup.php(127): Setup->_dispatchFrontController()
#13 /var/test/trunc/public/index.php(4): Setup->run()
I have the same problem.
It seems that the MS Exchange server does not allow relaying, which means that emails from an external source (like a webserver) are not allowed to be sent.
This is supposed to help: http://technet.microsoft.com/en-us/library/dn554323(v=exchg.150).aspx
I set it up the way it's described, but it still did not resolve my problem. I'm also unsure how to integrate the MX-Server into my web-application. Using it as Server-Adress in the Zend_Mail_Transport_Smtp gave me the same error as before. Maybe someone else can clarify that with the additional information.