I am getting only this error each time I go to settings for my drupal theme, it only shows then
Deprecated function: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\Component\Utility\Html::escape() (line 424 of core/lib/Drupal/Component/Utility/Html.php).
How to fix this..I don't even know what it means
it is d9 latest build with adaptive theme
It seems to be the only error in my error log...the theme and site functions ok but this error popping up concerns me
Related
When I was in Hostgator server, it wasn't showing any warning. But when I tried to move the files to my friend's Godaddy Linux server, and when I accessed the site, am seeing the following warning at the top of the page.
Warning: Invalid argument supplied for foreach() in
/wp-content/plugins/woocommerce/includes/class-wc-post-types.php on
line 169
I have the WP-DEBUG constant in wp-config file set to FALSE.
Also, tried adding a php.ini file with the following contents:
display_errors = Off
expose_php = Off
But not getting resolved. Any reason why it happens in Godaddy?
EDIT
Even updated the Woocommerce plugin to the latest version. But still no use.
this mostly caused by PHP version so try to check which version of PHP you are using.
I attempted to upgrade my D6 installation to D7, but when I hit my home page now, I get this string of errors:
Notice: Undefined offset: 0 in drupal_theme_initialize() (line 100 of /public_html/includes/theme.inc).
Notice: Trying to get property of non-object in _drupal_theme_initialize() (line 146 of /public_html/includes/theme.inc).
Notice: Trying to get property of non-object in _theme_load_registry() (line 335 of /public_html/includes/theme.inc).
Notice: Undefined offset: 0 in template_preprocess_maintenance_page() (line 2733 of /public_html/includes/theme.inc).
Notice: Trying to get property of non-object in template_preprocess_maintenance_page() (line 2733 of /public_html/includes/theme.inc).
Warning: array_keys() [function.array-keys]: The first argument should be an array in template_preprocess_maintenance_page() (line 2736 of /public_html/includes/theme.inc).
Warning: Invalid argument supplied for foreach() in template_preprocess_maintenance_page() (line 2736 of /public_html/includes/theme.inc).
Does anyone know how I fix this?!
Worse yet, I can't access my /user (login) page to get to my admin panel. Clearing my cache via PHPMyAdmin doesn't work either.
HELP :)
It looks like it may be your theme that is an issue. It may not be compatible with D7. To test this enable the base garland theme and make it your default.
WARNING - WE ARE GOING TO MANUALLY EDIT THE DATBASE. MAKE A BACKUP OF YOUR DATABASE BEFORE ATTEMPTING THIS!!!
First make sure the garland theme is enabled by executing this query in phpmyadmin
UPDATE system SET status=1 WHERE name LIKE '%garland';
Then set it as your default theme and truncate the cache tables by running these queries
UPDATE variable SET value='s:7:"garland"' WHERE name = 'theme_default';
TRUNCATE cache;
TRUNCATE cache_bootstrap;
TRUNCATE cache_block;
If your site is now accessible, you can focus on fixing your theme. If it isn't a custom theme, check the theme's project page and see if there is an update for D7.
If you are still having problems, post back and we can dig deeper.
I would make a couple of recommendations for the future as well.
Start by getting a local install of your site for testing. You can run WAMP (http://www.wampserver.com/en/) or MAMP (http://www.mamp.info/en/index.html) if you are on a Mac. Then you can upgrade locally and catch these problems before they hit your live site.
Second, always make a backup of your site files and database before upgrading. Rolling back will only take a few minutes and you will be very happy to have that backup when (not if) something goes wrong.
I'm using WPML plugin (Version: 2.0.4.1) in my WordPress(Version 3.5.1) site, but when I try to activate Twenty Eleven Theme, after that get this warnings.
Warning: Invalid argument supplied for foreach() in C:.....\wp-content\plugins\sitepress-multilingual-cms\inc\functions-string-translation.php on line 304
Warning: Invalid argument supplied for foreach() in C:.....\wp-content\plugins\sitepress-multilingual-cms\inc\functions-string-translation.php on line 304
WPML 2.0.4.1 is really not supposed to work on WordPress 3.5. It was released before WordPress 3.2 existed. Since then, we've made over 1000 changes to WPML including numerous compatibility updates and bug fixes.
I know that this doesn't solve the problem you're facing, but I'm trying to explain that you're trying to get a very old version to work where it's most likely not going to work.
Getting this error after a forced wordpress upload (I was working in the database when at one point of time I got an alert - while on the backend, with only one option to upgrade to the newer available version):
Fatal error: Cannot redeclare _421736532() (previously declared in /home/user/domains/mydomain.com/public_html/wp-content/themes/twentyelevenmodified/header.php(68) : eval()'d code:1) in /home/user/domains/mydomain.com/public_html/wp-content/themes/twentyelevenmodified/header.php(68) : eval()'d code on line 1
The above is when I try mydomain.com
When I try mydomain.com/wp-admin/, I am redirected to wp-login.php and getting the following error:
Fatal error: Cannot redeclare _421736532() (previously declared in /home/user/domains/mydomain.com/public_html/wp-login.php(80) : eval()'d code:1) in /home/user/domains/mydomain.com/public_html/wp-login.php(80) : eval()'d code on line 1
Pulling my hair out trying different things since 5 hours now. Any help will be appreciated.
EDIT: After testing, I found that the function.php file is correctly calling function twentyeleven_header_style() and the problem is coming just after calling this function. So it's the next function call that is causing the problem. If I could know what is the next function !!!
Wordpress doesn't use functions with those names. Deactivate your plugins or rename the plugins folder.
If that doesn't work then it's probably coming from your theme. Rename your theme folder so wordpress will revert to the default (assuming the default theme exists).
It sounds like you purchased a theme or plugin with obfuscated code and it's using eval() to run it and probably making a call home.
After much research, I found that the site in question was hacked. More than 100 files were corrupted with codes. I cleaned them all and now things are functioning.
For others facing the same problem, download the whole files to your computer and look for eval codes (can be easily recognized).
I just upgraded to wordpress version 3.5 and using guesthouse theme. It used to work fine with wp previous version. However, after upgrading. I got this error whatever click on post link .
Fatal error: Call to a member function options() on a non-object in C:\xampp\htdocs\wordpress\wp-content\themes\guesthouse\ait-cache\_Nette.FileTemplate\_Templates.main-single-ait-room.php-16702044d886e338830f0567f9043065.php on line 74
Anybody has any idea what's wrong with that.
Thanks
Did you updatethe GuestHouse theme to the latest version? It might have compatibility issue with WP3.5
http://themeforest.net/item/guesthouse-hotel-sport-center-2in1-premium-theme/1453399