WordPress.org

Ready to get started?Download WordPress

Forums

"injects" code when toggle between html & visual editor (19 posts)

  1. Johmai
    Member
    Posted 2 years ago #

    Whenever I switch from html mode to visual mode while editing posts I notice this:
    1) Javascript line is inserted at the bottom of each post.
    I'd like to know what the code is because it sends information off-shore. Interestingly, if I disbale Javascript in my browser the code cannot send. Maybe experts know what this means?
    I made sure my version of Java is up to date and deleted old version etc. Please note, I'm NOT confusing Java with JavaScript - both are required.
    2) a mere switch from text to html mode changes the post enough that WP prompts me to "stay on the page" or press "update" first.
    3) custom html is either not saved or renders inaccurately in browser.
    I have also read several other posts about this but nothing seems to apply to this case.
    I disabled plugins, cleared browser cache compulsively.
    Also experimented with tinyMCE alternatives but these symptoms persist.
    I'm now also unable to make backups and the developer whose plugin had afforded me this luxury rarely utters a comprehensible phrase. Subsequent reinstalls do not offer relief.
    If you know a protocol to follow or better place to be looking for it god bless you today.

  2. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    Alternating between visual editor and html editor while editing/ creating a post sometimes can cause this problem. A link to your site can help us to look for the likely causes more precisely.

  3. Johmai
    Member
    Posted 2 years ago #

    Hi, I'm sorry but it's a local site and I'm using WAMP.
    Is there an alternative way for you to see what's going on?

  4. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    I can't say without looking at what is going on, sorry. Maybe some others may be able to tell you.

  5. 1) Javascript line is inserted at the bottom of each post.

    That's not good. Before we get to the "Your WAMP or PC is hacked" try some simple things by way of troubleshooting.

    Have you tried:

    - Deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - Switching to the Twenty Eleven theme to rule out any theme-specific problems.

    - resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    - Re-uploading the wp-admin and wp-includes folders from a fresh download of WordPress.

  6. I made sure my version of Java is up to date and deleted old version etc. Please note, I'm NOT confusing Java with JavaScript - both are required.

    Wait. What?

    Sorry, but Java (not Javascript) is absolutely not a requirement for anything that ships with WordPress. In fact as much as humanly possible, I don't install Java on any of my PCs.

  7. insurgenesis
    Member
    Posted 2 years ago #

    I was following this advice:

    Go here to make sure your Java is working, http://java.com/en/download/testjava.jsp

    What you are seeing (or not seeing) is caused by a javascript error. Have you tried another browser?

    found here:
    http://wordpress.org/support/topic/kitchen-sink-is-gone?replies=11

  8. That's not really wrong per se in that it does make Java current and working (in theory, DARN YOU ORACLE!!! BRING BACK SUN MICROSYSTEMS!!! Ahem) but really, Java (not Javascript) and WordPress have nothing to do with each other.

    If you can, start your WAMP completely from scratch. No plugins, no new themes, nada, just plain jane install of WordPress and see if those editor goofyness comes back.

    If it does, please scan your PC from head to toe. Something is injecting that Javascript and it may be outside of your WordPress installation.

  9. Johmai
    Member
    Posted 2 years ago #

    @Jan,
    I can't redo WAMP now. I've run numerous pc scans - I'm clean.
    So do you think it gets inserted outside of the WP code base?
    If not, is there an easy way I can use search queries and kill the findings using Grep?

    I also found this directive in root .htaccess (and I didn't write it):

    RewriteEngine on
    # Options +FollowSymlinks
    RewriteCond %{HTTP_REFERER} in.admedia\.com [NC]
    RewriteRule .* - [F]

  10. So do you think it gets inserted outside of the WP code base?

    Well, something in inserting that Javascript, and that .htaccess addition is not from stock WordPress, that's for sure.

    Is there a non-WAMP WordPress install that you can play with? If it happens there too, then it's probably your PC. If it only happens on WAMP then you may need to delouse it as that may mean it's hacked.

    Or maybe a plugin is misbehaving: try my advice above first.

  11. Johmai
    Member
    Posted 2 years ago #

    Can I check/scan WAMP?
    How do I play with WP without WAMP?

  12. How do I play with WP without WAMP?

    Home Linux server always works well for me, or a spare VPS lying around. :P

    I suggest as a test, you shut down your existing WAMP and give Instant WordPress a look.

    http://www.instantwp.com/

    Except for running on localhost:4001 it's easy to setup and the webserver is only active when the Instant WordPress app is running. Easy peasy.

    If the Instant WordPress works without any problem then the issue you are having is probably your WAMP installation.

  13. Johmai
    Member
    Posted 2 years ago #

    Is the idea to move across the exact WP install from WAMP or to use a new install?
    I'm checking instantWP now and the problems are not recurring, needless to say, precisely because the particular WPinstall that it comes with is not mine.
    I don't see how it can indicate the problem because the problem resides in my other install on WAMP.

  14. I'm checking instantWP now and the problems are not recurring, needless to say,

    That's good because that hopefully has isolated the problem to your WAMP install and not necessarily your PC. That's exactly what I was hoping to confirm and I think you beat me to it a long time ago: it's your WAMP install.

    I suggest you just use the InstantWP instead and proceed from there.

  15. Johmai
    Member
    Posted 2 years ago #

    It's not my PC.
    What if you're right - what do I do with the stuff on WAMP then?
    I cannot start all over again and I'm not sure my files will be safe if I reinstall WAMP.
    There has to be a search&remove tool to locate the problem either in WAMP itself or in WP base code.

  16. kmessinger
    Volunteer Moderator
    Posted 2 years ago #

    Java (not Javascript) and WordPress have nothing to do with each other.

    Thanks Jan. Why are things so much clearer first thing in the morning drinking a fresh cup of coffee? I stand (actually I sit) corrected.

  17. Johmai
    Member
    Posted 2 years ago #

    Hi kmessinger, I've had several cups on this one.

    Please note, I'm NOT confusing Java with JavaScript - both are required.

  18. "Life's too short to drink cheap beer"

    Keith, anytime you reply with anything it's automatically good. Thanks for all the help you continue to provide. :D

    What if you're right - what do I do with the stuff on WAMP then?

    Well... WAMP on your PC is always sacrificial, meaning if something goes awry but burn it to the ground and start again. Something's gone wrong with your WAMP install so I suggest you wipe it completely out and try again.

    Save any work you've done in plugins or themes first and start over again.

  19. s_ha_dum
    Member
    Posted 2 years ago #

    I've seen this before:

    RewriteEngine on
    # Options +FollowSymlinks
    RewriteCond %{HTTP_REFERER} in.admedia\.com [NC]
    RewriteRule .* - [F]

    I am trying to help someone sort out a similar Javascript injection issue on another thread and that identical .htaccess is showing on his local server.

    We have no solutions yet. In fact it is pretty maddening, but you can see what we've tried. I don't know if my guy is using WAMP, but I kinda hope so :)

Topic Closed

This topic has been closed to new replies.

About this Topic