With a module I added an custom customer attribute.
When a client is logged in and want to edit their account information or want to change their password on frontend the following error comes up:
Fatal error: Class 'Zend_Log' not found in /app/code/community/Amar/Profile/Model/Customer/Attribute.php on line 49
I build this website local and uploaded it to the server.
On the local environment this error is not showing up, this error only showing up on the server.
I think it has to do something with file permissions.
Does anyone have a solution for this?
the problem has been solved.
On the live server there was another PHP version which was not compatible with the extension.
For me a function loadByCode() causes the issue, I have renamed it and it is working fine. We should not use generic method names in custom modules.
The function is in \app\code\community\Amar\Profile\Model\Customer\Attribute.php file.
Related
Jus tried to log in to my web admin and got this error:
Fatal error: Cannot redeclare oceanwp_webfonts_enqueue() (previously declared in /home/customer/www/ozdistributorsusa.com/public_html/wp-content/plugins/ocean-extra/includes/compatibility/ocean.php:94) in /home/customer/www/ozdistributorsusa.com/public_html/wp-content/themes/oceanwp/inc/customizer/controls/typography/webfonts.php on line 128
I can't get acces to the actual site either, any suggestions?
To fix it I manually commented the following functions in /wp-content/plugins/ocean-extra/includes/compatibility/ocean.php:
oceanwp_webfonts_enqueue()
ocean_get_google_font_css()
oceanwp_get_local_webfonts_data_dir()
oceanwp_get_local_webfonts_css_data_dir()
It was a "bad" update, which is now already fixed in 2.0.4 (https://wordpress.org/plugins/ocean-extra/#developers)
After commenting you can update that plugin via the panel or alternatively you can manually update it by removing the folder /wp-content/plugins/ocean-extra/ and uploading again the plugin.
I had the same problem, I got access by changing the theme via in the Database (VIA PHPmyAdmin) for one of the ones that comes by default (like twentytwenty).
I installed a new theme but the whole thing seems unstable still. If nothing better comes up I'm starting a fresh install.
oceanwp_webfonts_enqueue() function declare more than one. this function may be used in loop.
I have a live running website developed using magento (1.8.1.0). The frontend is working fine but (from this morning) when I try to log in the admin panel I get the "http error 500" even if I use a wrong password or username.
Foreach login attempt the magento error log reports:
mod_fcgid: stderr: PHP Fatal error: Call to a member function
loadByUsername() on a non-object in
$MAGENTO_ROOT/httpdocs/includes/src/Mage_Admin_Model_User.php on line 408
the corresponding code in Mage_Admin_Model_User.php is:
406> public function loadByUsername($username)
407> {
408> $this->setData($this->getResource()->loadByUsername($username));
409> return $this;
410> }
I have just deleted the cache and session directories but the problem remains.
what could have happened ? how can I fix it ?
(from this morning)
Was there any update on server (hosting)? I would try to search on official Magento site if it is a common bug (other users can face it after update too)
Test copy of installation (ftp + db) on different server (hosting) in order to see if the problem persists.
Try to Google it similar to this ($MAGENTO_ROOT/httpdocs/includes/src/ is your site specific so Google will find nothing relevant):
loadByUsername() on a non-object in Mage_Admin_Model_User.php on line
408
Thank's all for the contribute, the problem is solved. It was very sneaky.
I've found in the directory app/code/core/Mage/ the directory "Admin" renamed as "Admin " (Admin with 2 spaces). Moreover this files were missing: app/code/core/Mage/Admin/etc/config.xml and app/code/core/Mage/Admin/Helper/Data.php.
After renaming the directory, restoring files, deleting cache and session, the problem is solved.
It was probably originated by a cache update in Cache Management section.
We have inherited a magento (CE 1.8.1.0) installation that is showing the following error on a Friday morning on opening the product page:
Fatal error: Call to a member function setType() on a non-object in /data/www.walls.pk/public_html/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Collection.php on line 54
There have been no changes to the code on the server that was running fine for the last 6 months.
Can there be a server related or configuration related change (i am thinking from the hosting company) or a version upgrade that causes such an issue ?
Your core eav entity model is unable to instantiate.
$entityTypeId = (int)Mage::getModel('eav/entity')->setType(Mage_Catalog_Model_Product::ENTITY)->getTypeId();
Assuming you have a file that exists in:
app\code\core\Mage\Eav\Model\Entity.php
Clear all caches and delete any cache folders in
root/var/
Run Magento's database fix utility.
Post your
root/var/log/exception.log
and
system.log
contents ( Enable logs if they're empty ).
Check your apache logs for detailed info.
I have a drupal site and inside i have a wordpress blog like that drupal_site/wordpress_blog.
When i did the implantation all seemed to work fine but now i am getting the following error
Fatal error: Cannot redeclare timer_start() (previously declared in (path_of_mysite)/includes/bootstrap.inc:456) in (path_of_mysite)/blog/wp-includes/load.php on line 197
I have renamed the timer_start() but then i got another same error for another function.
So the problem is that drupal's functions "overrides" wp functions and renaming every wp core function not working.
Also i have tried at least the errors to not shown at my page, i have disable them from my drupal dashboard, i have tried via .htaccess,via index.php,also via phpmyadmin but this error keeps showing.
Update:I found the solution for the errors to not be shown,i just have added
error_reporting(0);
to wp-config.php.So at least there is something.
Any clue for the solution?
Drupal and Wordpress are trying to declare the same function names. To solve this type of problems PHP had introduced namespaces in PHP 5.3, more info: http://www.php.net/manual/en/language.namespaces.php, but saddly Drupal and Wordpress did not use namespaces.
My recomendation to avoid this problem is to install Drupal and Wordpress in different subdomains, so if your domain is drupal_site.com, use blog.drupal_site.com for Wordpress installation.
I have just installed YII without any problems, but I cannot get into GII. I have uncommented the specific lines in mywebapp/protected/config/main.php to enable GII.
When I try to go to: localhost/myapp/index.php?r=gii I am redirected to localhost/myapp/index.php?r=gii/default/login.
I don't have the URL manager enabled it is a fresh installation on Wamp.
The error I get is this:
Fatal error: Cannot redeclare class CLogRouter in C:\wamp\www\yii\framework\logging\CLogRouter.php on line 53
The yii folder is the installation folder (did not know that the app is still using it).
What could be causing the trouble and how to get GII working? Thanks for your replies!
It is not clear what your problem is.
Getting redirected to /gii/default/login is good. This is where you log in with a password.
Your error "Cannot redeclare class CLogRouter" indicates that you are declaring CLogRouter twice. This probably happens in your protected/config/main.php.
However, I am under the impression that this error is not related to gii. Why don't your turn logging off (for now)?