Hani Posted April 28, 2014 Share Posted April 28, 2014 I have a Wordpress blog installed in a subdirectory of a PW site (transferring the blog from WP to PW is on my task list) that was working with Processwire 2.2.9. I just upgraded to 2.4 and it broke. The error I'm getting is: Fatal error: Cannot redeclare __() (previously declared in /home/me/mydomain.com/blog/wp-includes/l10n.php:146) in /home/me/mydomain.com/wire/core/LanguageFunctions.php on line 39 Any idea what I can do (temporarily) to get it up and running? Processwire is installed at the root of the domain and Wordpress is installed at /blog. EDIT: I don't have any of the Language Support modules installed. Link to comment Share on other sites More sharing options...
Hani Posted April 28, 2014 Author Share Posted April 28, 2014 Now that I think about it, shouldn't the .htaccess file not even give Processwire "control" since the /blog/ directory physically exists on the server? This line in the .htaccess file should take care of that, right? RewriteCond %{REQUEST_FILENAME} !-d Link to comment Share on other sites More sharing options...
Hani Posted April 28, 2014 Author Share Posted April 28, 2014 For anyone else who runs into this issue, a quick, temporary fix is to hack the LanguageFunctions.php file. For all three functions in there, you'll need to wrap each with a check to make sure the functions haven't already been declared. For example, the first function: if (!function_exists ('__')){ function __($text, $textdomain = null, $context = '') { ...snip... } } My best guess is that this not recommended as a permanent solution since it may cause issues with WordPress. And of course, ProcessWire upgrades will overwrite the hack. Best solution? Don't use Wordpress. For reference, here's Ryan's awesome Blog Profile for ProcessWire. http://modules.processwire.com/modules/blog-profile/ 3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now