Hi,
I have an emergency as my site has stopped working. I am getting a 500 server error and after looking in my error logs from my cPanel, I can see the following message:
PHP Fatal error: Call to undefined function entity_language() in /home5/tranceto/public_html/sites/all/modules/metatag/metatag
I have read that I need to upgrade my system version. I am currently using System version 7.12 and I have read in other threads that I need to upgrade to 7.15, however I cannot log into my website to work the system upgrade.
Further more, I am new with Drupal, so my technical ability is amateur. I am in urgent need of help as my site is offline until I can resolve this.
Comments
Comment #1
cwoon CreditAttribution: cwoon commentedHere is the code from the metatag file:
function metatag_entity_get_language($entity_type, $entity) {
// Determine the entity's language.
$langcode = entity_language($entity_type, $entity);
//$langcode = '';
// If no matching language was found, which will happen for e.g. terms and
// users, it is normally recommended to use the system default language.
// However, as the system default language can change, this could potentially
// cause data loss / confusion problems; as a result use the system "no
// language" value to avoid any potential problems.
if (empty($langcode)) {
$langcode = LANGUAGE_NONE;
}
Comment #2
gregglesI suggest disabling the metatag module in the database:
update system set status = 0 where name like 'metatag%';
That should let you load your site again and do the core update.
Comment #3
gregglesYou may want to check which metatag modules are enabled before doing that query. Just so you can easily re-enable them...
select status, name from system where name like 'metatag%';
When it comes time to re-enable them, be sure to do it via admin/modules UI.
If you have access to drush you can also hopefully do the disable via drush which will be cleaner than doing the direct db query i suggested earlier.
Comment #4
cwoon CreditAttribution: cwoon commentedHi greggles.
Thank you very much for the reply.
I am able to access my database through phpmyadmin. I located the correct database which has the module named 'dr_metatag'. I believe this is where the error module is. (There was also other metatag modules 'dr_metatags_quick_path_based' & 'dr_metatag_config')
I attempted to first check which modules were enabled using your query, however I received this error:
#1146 - Table 'tranceto_drp1.system' doesn't exist
I then tried to perform the disable query, but the system again gave me the same response:
#1146 - Table 'tranceto_drp1.system' doesn't exist
What would you suggest is my next move?
Comment #5
cwoon CreditAttribution: cwoon commentedComment #6
cwoon CreditAttribution: cwoon commentedI forgot to mention that I do not have access to drush.
Comment #7
DamienMcKenna@cwoon: Just repeat the queries that greggles provided but add the "dr_" prefix to the table names, e.g.: update dr_system set status = 0 where name like 'metatag%'
Comment #8
gregglesDamien is right - it appears you installed your site with the table prefix feature, so all your tables start with dr_ before the normal name.
Comment #9
cwoon CreditAttribution: cwoon commentedThanks guys... SUCCESS!!!!
I managed to install Drush which I managed to operate thanks to your earlier mention Greggles. I am going to have another look at the phpMyAdmin controls as I want to know how to use this.
But I was able to successfully disable the metatag module through Drush which returned access to my site. Initially I was receiving a 404 error on all pages apart from the home page and an admin page, but once I replaced my htaccess file, all returned to working order.
Next point of call is a core update.
Thanks again!