Warning: file_put_contents(): Filename cannot be empty - drupal

After updating Drupal 8 to Drupal 9, the following error is displayed on the website page:
Warning: file_put_contents(): Filename cannot be empty in /var/www/html/web/modules/contrib/devel/src/DevelDumperManager.php on line 108
Although it is not in the logs. But there is a similar one:
Warning: file_put_contents(): Filename cannot be empty in Drupal\search_api_solr_devel\Logging\SolariumRequestLogger->preExecuteRequest() (line 148 of /var/www/html/web/modules/contrib/search_api_solr/modules/search_api_solr_devel/src/Logging/SolariumRequestLogger.php)
Perhaps these errors are somehow related. How I do fix these errors?
I tried debugging and this is what xdebug shows for the first error:

Looking at line 108 of devel/src/DevelDumperManager.php it seems to be wanting a file name that should be set in config.
This filename should have a default, but if you have upgraded it might not have been set correctly. Maybe just going to the devel settings page and saving the form would set this value.
Or maybe uninstall and reinstall the devel module.

Related

Building PhantomJS 2.0 on Windows results in a strange error

I am trying to build PhantomJS 2.0 on Windows from the c:\fastio\phantomjs\phantomjs directory. For some reason, the build process fails after a while, with 2 errors (see error message below):
1) It tries to access "C:fastiophantomjsphantomjssrcqtqtbasebinmoc.exe". Obviously, the backslash characters between directory names are somehow getting stripped away deep in the build process - possibly a mismatch between Windows-style "\" and Linux-style "/" (but this is only a guess).
2) There's another error, "Failed to read names from file: C:/fastio/phantomjs/phantomjs/src/qt/qtwebkit/Source/WebCore/mathml/mathtags.in".
If I remove sh.exe from the PATH, the build still gets to this point, and only error #2 appears, leading me to think that error #2 is the real problem here.
Here is the full error message (as far as I can tell this is happening while building WebKit):
sh: C:fastiophantomjsphantomjssrcqtqtbasebinmoc.exe: command not found
Failed to read names from file: C:/fastio/phantomjs/phantomjs/src/qt/qtwebkit/Source/WebCore/mathml/mathtags.in at C:/fastio/phantomjs/phantomjs/src/qt/qtwebkit/Source/WebCore/dom/make_names.pl line 315.
NMAKE : fatal error U1077: 'C:\Users\Eugene\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad\bin\perl.EXE' : return code '0x7f'
Stop.
(By the way, I saw this question but I'm already past the issues described there, my error is happening later in the build process.)
How can I make this work?
Full logs below:
Console output:
http://pastebin.com/btMeNPz4
QT build log file build_qt_4-285-20-0859.log:
http://pastebin.com/LUEJz7E0
WebKit build log file build_webkit_4-285-20_0859.log:
http://pastebin.com/494TivXF
PhantomJS build log file build_phantomjs_4-285-20_0859.log:
Empty
Looks like I found the solution myself, here were my steps:
Remove as much as possible from the PATH leaving only the entries critical to the build process
Most importantly, remove all GitHub's git directories from the PATH
Install GIT separately (not from GitHub but from git-scm.com), add its cmd directory only (not its bin directory) to the PATH
Install ActivePerl separately, add it to the PATH
It's moving past the error I asked about with the steps above (still not sure if it will finish the build successfully, it's taking a while).

Woocommerce plugin - Warning: Invalid argument supplied for foreach()

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.

Upgraded from Drupal 6 to Drupal 7, and I get this error

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.

Symfony 2 Missing File Error When They're Not

I got my Symfony 2.3 project working through app.php in development. I then did a complete copy to my shared host sever (goDaddy). So far, all I get are blank pages. I've been working my way through the errors. My lastest execution generates 100+ errors in the php log of this type:
[09-Jul-2013 12:52:56 America/Los_Angeles] PHP Warning: file_get_contents(/Volumes/Data RAID/htdocs/Symfony/src/Zetcho/AmColAnBundle/Resources/views/User/userSubNav.html.twig) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in /home/content/.../Symfony/vendor/symfony/symfony/src/Symfony/Component/Templating/Storage/FileStorage.php on line 32
Then I get one of theses
[09-Jul-2013 12:52:56 America/Los_Angeles] PHP Warning: file_get_contents(/Volumes/Data RAID/htdocs/Symfony/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception_full.html.twig) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in /home/content/.../Symfony/vendor/twig/twig/lib/Twig/Loader/Filesystem.php on line 127
The ellipses are mine. I verified that the file that both files were was at the locations specified and that I could read it. The permissions on the files are 644. Could this be a permission problem? If so, what should they be set to?
Update: I set the permissions to 755 and got the same errors.
Update 2: I just noticed that the error is giving my development server directory path. Now I just have to figure out where to change it.
Update 3: It appears to be the cache. There is not command access to a goDaddy shared server that I know of so I just deleted all the files in app/cache/prod. I now get my html, but no css. I use Assetic for images and css. I get the images.
Update 4: When I clicked on a link, the next page used the css file. When I went back to the first page, it used it as well. As I check out the pages, some of the images are missing. Could this be because the cache wasn't rebuilt correctly or completely?
Update 5: Fixed the last problem with missing images. There was a case mismatch between the reference and the image. I think I'm good now.

Error Loading Zend Gdata framework into Wordpress

I am trying to use the Zend Gdata framework with wordpress but I am having some issues.
Now everything works perfectly fine when I test on localhost with XAMPP. However on my web server my code breaks down.
Here is my code to include the framework.
`set_include_path(TEMPLATEPATH . '/includes/');
require_once ('Zend/Loader.php');
Zend_Loader::loadClass('Zend_Gdata_Youtube');`
That code produces the following error.
Warning: Zend_Loader::include_once(Zend/Gdata/Youtube.php) [zend-loader.include-once]: failed to open stream: No such file or directory in /home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/Zend/Loader.php on line 146
Warning: Zend_Loader::include_once() [function.include]: Failed opening 'Zend/Gdata/Youtube.php' for inclusion (include_path='/home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/') in /home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/Zend/Loader.php on line 146
Fatal error: Uncaught exception 'Zend_Exception' with message 'File "Zend/Gdata/Youtube.php" does not exist or class "Zend_Gdata_Youtube" was not found in the file' in /home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/Zend/Loader.php:99 Stack trace: #0 /home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/modules/yt_link_checker.php(19): Zend_Loader::loadClass('Zend_Gdata_Yout...') #1 /home/damain/public_html/mysite.com/wp-includes/plugin.php(405): load_zend_gdata('') #2 /home/damain/public_html/mysite.com/wp-admin/admin.php(111): do_action('load_zend_gdata', Array) #3 /home/damain/public_html/mysite.com/wp-admin/index.php(10): require_once('/home/damain/...') #4 {main} thrown in /home/damain/public_html/mysite.com/wp-content/themes/mysite/includes/Zend/Loader.php on line 99
I cannot seem to figure this issue out. Can anyone help?
The best solution in this case is to run the script requiring the Zend Loader and use var_dump(get_include_path()) to see what the server says the path is. Then keep modifying the php.ini include_path until the script finds it.
In your case, I'm not sure if 'damain' is supposed to be 'domain'. My include path which finally worked was:
/home2/thelove6/public_html/zf/ZendGdata/library" thelove6 being the username.
Did you look to see if those files exist in those directories? (/mysite/includes/Zend/Loader.php) and they have the correct permissions? It sounds like that could very well be the issue. The other thing to check with a simple phpinfo() would be that you have all of the libraries install on the live server.
Ok, the possible reason is: You're not using the proper case for the classname. For the version 1.11.11, it will be Zend_Gdata_YouTube rather than Zend_Gdata_Youtube.
Windows OS is ignoring the case, whereas the Linux server does not. Hope this will solve your problem, just look at the proper case of the Class or filenames.

Resources