WordPress.org

Ready to get started?Download WordPress

Forums

PHP Desperation (17 posts)

  1. foxtale1
    Member
    Posted 3 years ago #

    In attempting to edit my comment.php code, I have royally effed up my website. (FoxtaleCosplay.com) Nothing shows up but errors and I can't even access my admin panel. Help!

  2. foxtale1
    Member
    Posted 3 years ago #

    Is there any way I can just restore all of the php files to how they were before?

  3. foxtale1
    Member
    Posted 3 years ago #

    I feel like the more I mess with it, the more I keep screwing it up.

    This is what shows up when I try and log into my wp-admin:

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'sanitize_comment_cookies' was given in /home/foxtale1/public_html/wp-includes/plugin.php on line 395

    Fatal error: Cannot redeclare comment_exists() (previously declared in /home/foxtale1/public_html/wp-includes/comment.php:19) in /home/foxtale1/public_html/wp-admin/includes/comment.php on line 27

    And if you check out my site you can see that it's all kinds of wrong right now. All help appreciated. Thank you!

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    are you messing with the comment.php in wp-includes?

    That's a no-no, never mess with Wp core files.

    Restore the file to original.

    Either by reinstalling WP (From the upgrade menu, you can do a 1 click reinstall) or use ftp to put the file back there from a fresh download of your version
    http://wordpress.org/download/release-archive/

  5. foxtale1
    Member
    Posted 3 years ago #

    Thanks!

    which one of those should I click on?

  6. foxtale1
    Member
    Posted 3 years ago #

    Sorry, I'm computer retarded. How do I do a 1 click reinstall when I can't access my wp-admin?

  7. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    I missed that part, sorry.

    What version of WP do you have installed now? That's the one you need to download....

  8. foxtale1
    Member
    Posted 3 years ago #

    I think it was the latest 3.1.1. So what do I do after I download it?

    Thank you so much btw for your help.

  9. foxtale1
    Member
    Posted 3 years ago #

    OMG, Got it!

  10. foxtale1
    Member
    Posted 3 years ago #

    Thank you thank you thank you

    I still get this: Fatal error: Call to undefined function have_comments() in /home/foxtale1/public_html/wp-includes/theme-compat/comments.php on line 25

    On each of my posts, though...

  11. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    Have you messed with any other files?

    If so, a full reinstall may help

    which is simple if you already know how to use ftp

    basically just reupload all WP files from a fresh install EXCEPT wp-content folder, and wp-config.php file. Never delete those (and always keep backups of them)

  12. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    Otherwise, try switching to twentyten theme, and deactivating all plugins to test if any of them are messing with your install

  13. foxtale1
    Member
    Posted 3 years ago #

    Okay will do. Is the best way to do that just one file at a time?

    You are godly, btw

  14. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    Honestly what I do, is download the wordpress to my desk, delete wp-content folder, and wp-config or wp-config sample from the fresh download folder, then rezip it

    I then delete the files off my server, except for wp-content folder and wp-config.php file (which I back up before I start any of this, just in case)

    Then I upload my custom zip folder (with the removed file and folder) to my server

    I unzip the folder on the server And place the files

    HOWEVER- if you now have admin access, you can go to upgrade section and do a 1 click upgrade to the same version to reinstall, which often works for me when I break something

  15. foxtale1
    Member
    Posted 3 years ago #

    Awesome, thanks so much!

  16. marklkennedy
    Member
    Posted 3 years ago #

    Hello,

    I too, messed something up by trying to make a change to my menu as per below.

    I am using the Mystique theme.

    I already added one link in my top navigation bar, but when I added another, I can’t get into my site (www.healthynomics.com) – I just get a white page.

    Also, when I go to my WP login screen, it redirects me to this:

    http://www.healthynomics.com/wp-login.php?redirect_to=http%3A%2F%2Fwww.healthynomics.com%2Fwp-admin%2Fedit.php&reauth=1

    How can I fix this?

    Many thanks.
    _______________________________________________________

    4. To put a link in the top navigation bar, add following code to, Under Appearance -> Mystique settings -> Advanced > User functions.

    function mymenu(){
    echo '

  17. <span>Menu Title</span>
    <span></span>
  18. ';
    }

    add_action('mystique_navigation', 'mymenu');
    It is useful when you want to put a external link in navigation bar. Change “Link to your Menu” by your link and “Menu Title” by your title.

  • marklkennedy
    Member
    Posted 3 years ago #

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags