-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
2.2.0 Checkout - Unable to save address. Validate class not found from basename 'Email Address #10821
Comments
Please use the issue reporting guidelines to report an issue. Include the steps required to reproduce, the actual result, and the expected result. |
Magento2 in any email address field not working means forgot password the user then this error Log create and not send message or Email Address class not found error give. exception 'Zend_Validate_Exception' with message 'Validate class not found from basename 'EmailAddress'' |
Please just edit issue description according to template: https://github.com/magento/magento2/blob/develop/.github/ISSUE_TEMPLATE.md |
@ravibhoraniya thank you for your report.
|
Hello. Precondition Steps to reproduce Expected result Actual result Log files shows also error
Composer file from my initial magento 2.x version i only updated composer.json
@ravibhoraniya did you get your error fixed ? Anyone else a hint ? Thanks |
Same issue, fresh installation, tried twice both from downloaded zip file and via composer. Setting mail addresses for the shop also fails. Ubuntu 16.04 Best regards |
@orjan Thanks |
Haven't had time to check any more, -Orjan |
I am also experiencing this same issue. Cannot check out after upgrading from 2.1.9 -> 2.2.0. Using: |
That's pretty strange error, looks like something happened to autoloading mechanism. Could somebody please debug what is actually happening in |
Also experiencing the same issue
|
@ravibhoraniya We have updated issue description with information from @PhiIipp's comment to simplify search of the same issues. |
I have the same problem, in a fresh installation of Magento 2.2 |
Hello, EmailAddress.php validator can be found here /var/www/vhosts/tarnava.ro/httpdocs/vendor/magento/framework/Validator/EmailAddress.php but it search in completly wrong directory and there is no EmailAddress.php /opt/plesk/php/7.0/share/pear/Zend/Validate/Magento/Framework/Validator Hope this info helps to find the rootcause. Thanks |
@PhiIipp great finding! But after 0b659d2#diff-b5d0ee8c97c7abd7e3fa29b9a27d1780L220 Magento is not using @ravibhoraniya please check if it solves problem for you. @mslabko @okorshenko @vrann considering previously reported #10985 (comment) maybe it makes sense to add such information into http://devdocs.magento.com/guides/v2.2/release-notes/backward-incompatible-changes.html? |
The solution provided by @PhiIipp worked for me too. Thanks. |
working for me too i use plesk php 7.0.24 and magento 2.2.0 |
in first time, soluton of @philipp worded. Now, 3 days later, i have the same problem, and in plesk is setted "." as path |
don't need to restart apache only if u changed the php.ini. maybe u should flush cache. |
So, I cleaned and flushed and so on. I´m also not getting any quotes if I´m a registered user. Maybe there is something wrong there with shipping-information or stuff, but I triple checked this also. I don´t know. This error didn´t let me sleep for one week ^^ |
So I figured out, that he searches in the Loader.php for the EmailAddress.php in I wonder why your edit in the Loader.php works, because if you just give im back that he is true, he normally shouldn´t find that file in that directory he is looking for. So in about line 186 in the Loader.php I have the normal code: So he is looking in the magento/framework and not the magento/zendframework1 Folder. Maybe someone is facing the same problem. Don´t know if this is some kind of weird rights-problem (I checked it twice and all rights are set correctly) or just some problem with a wrong namespace or stuff. Edit: you can also set the path to |
I did another solution:
and call this from isReadable function:
|
Philipp solution worked also on Magento 2.2.4 PHP 7.1.17 Debian 8.10 Plesk 17.8.11. Thanks |
Philip solution worked for me... but now Im facing with another issue ....
Im not completely sure that depend from changing " include_path ", but after this change Im gfacing this error and I cannot save anything in store>attributes>products someone have this issue ?? |
jwohlfeil's solution worked for me, but why can't zend autoload from vendor first? |
Reporting the same problem after upgrading from 2.2.3 to 2.2.5 on a dedicated server. |
For me the real problem was installation in dedicated server: same stuff in a standar and shared one worls perfectly, but when I move everything in dedicated one, many issue! |
It's not only a problem with Plesk and it's not a Magento-Problem! - create a php file with: |
I am using ISPConfig and adding include_path = "." in the custom php.ini options worked for me too. Thank you @PhiIipp for solution. |
to throw in some more pieces of clarity (after long debugging - thanks for the pointers above): the problem seems to occur when the include_path contains directories that are not in open_basedir - so adjusting either (or leaving out open_basedir) would work |
@PhiIipp solution worked for me in PHP 7.1 |
@PhiIipp thanks , works for me. |
Leaving my findings for others on the issue we had initially how this progressed following the @philipp fix in this thread and what we found and did to FIX :-) MAGENTO 2.2.9 Initial Error: Validate class not found from basename 'EmailAddress' Followed @philipp fix, set php_value include_path "." Implementing the above resolved the "EmailAddress" error, but I then received a new error: Validate class not found from basename 'NotEmpty' Having cleared the composer cache, deleted and rebuilt the vendor directory, the error persisted... So added debug code to the vendor/magento/zendframework1/library/Zend/Validate.php From the debug it was established that "Zend_Loader::isReadable($file)" was throwing the error when supplied $file = Zend/Validate/NotEmpty.php There does seem to be a namespace issue with NotEmpty, I'm guessing this is all translating to is_readable "./Zend/Validate/NotEmpty.php" in "vendor/magento/zendframework1/library/Zend/", translating to "vendor/magento/zendframework1/library/Zend/Zend/Validate/NotEmpty.php" The suggested fix for "Validate class not found from basename 'EmailAddress'" appears to actually create this issue. BUT in order to Fix we added The additional path in the php configuration resolves the issues as the validator file is checked to exist in all include_paths prior to throwing an error. I guess this is a bug in certain environments... Hope this helps someone. |
This doesn't work for magento 2.3.3 . |
I agree, the workaround of adding "vendor/magento/zendframework1/library/" to include_path appears to not be required as of M 2.3.X The workaround of adding "." to the Include path and open base directory remains a requirement. |
The solution of @blob84 worked for me on Magento 2.3.4. Thanks |
The solution with the dot worked for me on one of the servers. On the second server is not working. The servers are identical. |
Using workaround from @blob84 solved the problem. Magento 2.3.5-p1 Original settings:
New settings:
|
I have come up against this issue with M2.3.5 I believe this issue is caused by a combination of open_basedir and include_path. When open_basedir is set and does not include the PHP include_path default e.g ".:/usr/share/php", Magento will fail to find Zend Validate classes. The workaround solution is, either:-
In both, the above solutions include_path should not be set. The problem is caused by Magento loader.php taking the value of get_include_path adding the path it needs and setting back with set_include_path. The result is the PHP include_path default is retained, along with the paths required by Magento.
When this behaviour combined with open_basedir configuration that does not include the PHP include_path default, Magento will fail to find the zendframework1/library. This I think is compounded further on Plesk type systems as these use open_basedir to limit the scope of PHP access. Also when include_path is set via virtualhost directive in some environments I have seen Magento can no longer set the include_path - which causes other issues. I suspect the reason that this issue can not be replicated on the test instance is either open_basedir is not set or include_path default is not outside the scope of the value set to open_basedir. This could be completely avoided if the /lib/internal/loader.php set the include_path to empty when it is called for the first time. I am yet to test setting include_path to "" or "." in the php.ini as this would also fix the issue without the need to remove or adjust open_basedir. |
I can confirm this to be the case in M2.4.0 When open_basedir is set via PHP FPM pool config I'm unable to get the admin "Forgot your password?" functionality to work it will error with "Validate class not found from basename 'Magento\Framework\Validator\EmailAddress'" Therefor I'm unable to set open_basedir for PHP which is a problem in shared hosting and in general a security risk. When I include the path"[...]/vendor/magento/zendframework1/library" via "include_path" PHP in my PHP FPM pool configuration, it seems to work. |
So as of now.. the options are To the best of my understanding, none of these are proper solutions to the issue. Why was this closed? |
@Hoszi 's solution of editing the core seemed to be more durable than changing my php config, I'm using that for now, but I'm not so happy about editing core files. |
(d) delete open_basedir. do not set leave unset The issue is a conflict between include_path having a location that is outside open_basedir. In most cases this will be the include_path default value ".:some/path" - view phpinfo to see the default value for your environment. If you set include_path it blocks M2 from updating it but if you set ".:some/path" and leave include_path blank this normally works. If you are not using shared hosting with other websites on the same server just remove open_basedir Hope this helps... it is mad this is still an issue even up to M2.4 but this is more of a PHP issue |
but the default |
Either the "space" breaks the open_basedir configuration or everything after the "space" is ignored and thus your include path is "." - allow includes from current working directory... I suppose it remains to be seen if the "other systems" that require the "pear" part of the open_basedir configuration continue to work. The main issue is that your include_path configuration will likely have a value, either set in php config or by Magento that is outside of the scope of the open_basedir, this causes all includes to be denied. Ideally you would echo the value of include_path and open_basedir at the end of the index.php and then reconcile the scope in the paths. As soon as the include_path as a value that is outside the scope of open_basedir then all includes will break. Adding the missing "scope" to the open_basedir will fix the issue. Hope this helps |
exception 'Zend_Validate_Exception' with message 'Validate class not found from basename 'EmailAddress''
html/magento/vendor/magento/zendframework1/library/Zend/Validate.php:244
Preconditions
updated from 2.1.9 to 2.2 by update version in composer file and composer update, cache clearing and reindex shop looks working.
Steps to reproduce
put item in shopping chart to to checkout, enter address, all JS validators are fine, click next. then it shows up the "Payment Methods" page, when i click here on "Place Order" a notification messages says "Unable to save address. Please check input data."
Expected result
Go to next screen and confirm order is submitted.
Actual result
REST call
https://www.tarnava.ro/ro/rest/ro/V1/guest-carts/6c5eba65da84bff14b2xxxxxxx/payment-information
gets response{"message":"Unable to save address. Please check input data."}
Log files shows also error
Composer file from my initial magento 2.x version i only updated
"magento/product-community-edition": "2.2",
composer.json
The text was updated successfully, but these errors were encountered: