Reputation: 2358
I have problem on my wordpress site.
Warning: file_exists(): File name is longer than the maximum allowed path length on this platform (260)
D:\InetPub\vhosts\xyz\xyz.info\wp-includes\template.php on line 630
D:\InetPub\vhosts\xyz\xyz.info\wp-includes\template.php on line 633
D:\InetPub\vhosts\xyz\xyz.info\wp-includes\template.php on line 636
Screan of source https://postimg.org/image/vg0qfdopl/
Last one year all is work fine....Any solution?
Upvotes: 0
Views: 472
Reputation: 3180
Some error messages in WordPress can be misleading as they are often reported by the WP core code that is calling the 'faulty' piece of code. So in your case the three errors / erronous lines:
D:\InetPub\vhosts\xyz\xyz.info\wp-includes\template.php on line 630
D:\InetPub\vhosts\xyz\xyz.info\wp-includes\template.php on line 633
D:\InetPub\vhosts\xyz\xyz.info\wp-includes\template.php on line 63
can all be "ignored" in that they are not the problem, nor should you be editing core files.
However, the key bit of information that is useful is:
Warning: file_exists(): File name is longer than the
maximum allowed path length on this platform (260)
This shows clearly where the issue is and why its occurring. Essentially WP is trying to load a file where the name/path of the file is more than 260 characters long.
This is a lot of characters and so, I would say that it's clear that you have an issue with your theme. Try disabling your theme and temporarily use one of the preinstalled WP themes. The error should go away, if it doesn't disable all your plugins and re-activate them one by one until the issue returns. Then you will find which plugin is to blame.
However, I very much doubt it has anything to do with plugins, and that this is a theme issue. Is the theme one you built yourself or added some code to (eg in the functions.php)?
My guess would be that somewhere in the theme a piece of code is dynamically generating a link to another part or theme file, and that this code is possibly looping causing a huge uri to be written. Such a file shouldn't really exist so correcting the code should solve the issue. If for some reason a file with a crazily long path/name does exist, simply change it so something shorter.
UPDATE: This is actually being caused by WordPress being passed a urlencoded
page name/url rather than the url in string format.
Upvotes: 1