WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: After the Deadline] Changes HTML Tags to Non-Compliant ALL-CAPS (33 posts)

  1. Chip Bennett
    Theme Review Admin
    Posted 4 years ago #

    Today I installed the After The Deadline plugin to test it out.

    I use the HTML editor by default. I opened a draft post, and clicked the [PROOFREAD] quicktag button. AtD scanned the draft and returned no errors. However, the plugin apparently changed all of my DOCTYPE-compliant lower-case HTML tags to non-compliant ALL-CAPS tags.

    I can find no way to modify this behavior. The plugin offered no option to ignore whatever "rule" modified my HTML tags, and there are no configurable options on either the AtD plugin options page or on my profile page.

    Why on earth would a modern proofreading plugin change HTML tags to a format that has not been standards-compliant for several years now?

    http://wordpress.org/extend/plugins/after-the-deadline/

  2. rsmudge
    Member
    Posted 4 years ago #

    Hi Chip,
    I wrote After the Deadline. Here is what's happening:

    When you click proofread (I presume you're using the HTML editor), your text is transformed into the browsers representation of HTML. After you make your changes and click edit text, the browsers representation of the edited text is placed back into your editbox. The non-standard compliant representation coming back is courtesy of your browser.

    I tried a test post on Firefox 3.5.5 on MacOS X and it didn't change the case of my tags.

    Here are some work-around ideas:

    - Use the visual editor to proofread your posts. AtD can be activated with the green checkmark button.

    - Try another browser or upgrade your current one (I can't guarantee this will solve it).

    -- Raphael

  3. Chip Bennett
    Theme Review Admin
    Posted 4 years ago #

    Thanks, Raphael!

    The test I did was using IE8/WinXP. I will test later today using FF 3.5/Kubuntu.

    Why am I not surprised that IE is to blame?

    For various reasons, I both prefer and need to use the HTML editor. Hopefully FF won't exhibit the same behavior.

    Since this problem only exists when using the HTML editor (and then, only because it has to render the HTML), yet when running AtD while using the visual editor, is there any way to have AtD render using WordPress' visual editor rather than the browser, when using the HTML editor?

    (Hopefully that makes sense.)

  4. Chip Bennett
    Theme Review Admin
    Posted 4 years ago #

    Raphael,

    I tried running AtD under FF 3.5 and Kubuntu 9.10, but the plugin threw an error about not being able to contact the spell check server (or something?), and quit.

    I'll re-create again tonight, and give you the exact error message.

    In that case, though, none of my underlying HTML was touched - though that's probably not a very meaningful observation.

  5. rsmudge
    Member
    Posted 4 years ago #

    Ok, cool. Let me know what happens. I'm subscribed to the after-the-deadline tag so your response will go to my email.

  6. Chip Bennett
    Theme Review Admin
    Posted 4 years ago #

    Here's the error I get:

    There was an error communicating with the spell checking service.

    parsererror: undefined

    The plugin starts. I can see the display switch to visual editor, and then I get the dialogue with the above error message.

    When I click OK, the display returns to the HTML editor, with the content apparently unchanged.

    I think that's the best I can give you, without perhaps some more specific questions.

  7. rsmudge
    Member
    Posted 4 years ago #

    What does it do in the visual editor? If you could give me the text causing it that would help too. You can email it to me raffi at automattic dot com.

  8. Chip Bennett
    Theme Review Admin
    Posted 4 years ago #

    Oh, that would require using the Visual Editor. :)

    I'll try that this evening, and report back.

    (Sorry for the delay; weekend was spent preparing for hosting family for Thanksgiving.)

    p.s. glad to hear you'll be on WPWeekly next week!

  9. Chip Bennett
    Theme Review Admin
    Posted 4 years ago #

    Okay, so I tried using the visual editor, and don't get any errors. The spell-checking works as expected.

    What I did:

    1) In profile, un-checked "disable visual editor"
    2) Opened a draft post (consisting of a raw URL)
    3) Clicked the proofread button
    4) Proofread/spellcheck ran
    5) In profile, checked "disable visual editor"
    6) Returned to draft post, refreshed page (to reload HTML editor)
    7) Clicked proofread button
    8) Same error as above was returned.

    There is no specific text that is causing the error, as far as I can tell. I created a new post, consisting of the text: "This is a test."

    I still got the same error.

    There seems to be a problem invoking the spell-checker at all, when using the HTML editor.

  10. rsmudge
    Member
    Posted 4 years ago #

    Hi Chip,
    Would you be willing to give me a contributor level account on your blog so I can look at what's happening? Last time I had a tough to figure out issue, I learned that the user had an SSL enabled backend and I was able to update AtD to work with that.

    If you're not comfortable with that, we can continue to troubleshoot this way. Do you have Firebug installed? It'd be helpful to know:

    - What (if any) errors are showing up in the console
    - What are the results of your request
    - What did your browser try to POST

    You can email me raffi at automattic dot com.

    -- Raphael

  11. rsmudge
    Member
    Posted 4 years ago #

    Oh, one other thing to consider. This will at least tell me if the problem is something in your WordPress (in which case an account would help) or the browser.

    Can you visit the AtD/jQuery demo and see if it works for you:

    http://www.polishmywriting.com/atd_jquery/demo2.html

    If it does, then we'll move forward as above. If it doesn't, I'll get a Kubuntu live CD, FF 3.5, and see what happens.

    -- Raphael

  12. Chip Bennett
    Theme Review Admin
    Posted 4 years ago #

    Raphael,

    You've got email. Your contributor account is created.

    I'll check the demo later this evening.

    Slick demo, btw!

    Chip

  13. rsmudge
    Member
    Posted 4 years ago #

    Hi Chip,
    I haven't received an email. Did you put two T's into the automattic? After working here I can't spell automatic without wanting to put two T's into it.

  14. rsmudge
    Member
    Posted 4 years ago #

    And thank you much Sir! I see the problem. The AtD/HTML Editor is trying to post to the wrong thing. The /wordpress/ directory trips it up. I don't know why yet (both the visual editor and the HTML editor refer to admin_url()). Ideally both should be broken. Curiouser and curiouser said Alice.

  15. Chip Bennett
    Theme Review Admin
    Posted 4 years ago #

    Raphael,

    I sent a separate email; not sure why the one out of WordPress didn't send.

    Anyway, your demo works just fine for me with Kubuntu 9.10 and FF 3.5.

    Color me stumped...

  16. Chip Bennett
    Theme Review Admin
    Posted 4 years ago #

    Raphael,

    I noticed that you were able to poke around. Were you able to figure out anything?

  17. Chip Bennett
    Theme Review Admin
    Posted 4 years ago #

    Oh, I completely missed your earlier reply. Some sort of time-warp thing happening.

    Glad to know I was able to help diagnose the problem!

  18. rsmudge
    Member
    Posted 4 years ago #

    Yeah this one is tricky. I haven't replicated your setup with a /wordpress/ directory yet but I plan to. So the visual editor and HTML editor both call the same thing (admin_url()) to setup the path they post to. One working and the other not is very strange indeed. It's either some very strange bug and I'll track it down or a plugin or something modifying what admin_url() returns. I don't know which yet.

    Could you tell me what plugins you have installed? That info may or may not help me. I'm setting up a few long running tasks and once these are going I'll crunch through this problem.

  19. Chip Bennett
    Theme Review Admin
    Posted 4 years ago #

    Strange; I thought a /wordpress/ directory was common/normal practice.

    I doubt I'm using any plugins that would be modifying admin_url(), but I have listed my active plugins for you, in your draft post on chipbennett.net.

    Hopefully you can figure out what's going on. I would love to be able to use AtD!

  20. rsmudge
    Member
    Posted 4 years ago #

    Ok, I noticed you have 25 or so plugins loaded. :) Part of the power of the WordPress platform.

    Here is the code AtD uses to reference the admin-ajax script for the Visual Editor:

    $init_array['atd_rpc_url'] = admin_url() . 'admin-ajax.php?action=proxy_atd&url=';
    $init_array['atd_ignore_rpc_url'] = admin_url() . 'admin-ajax.php?action=atd_ignore&phrase=';

    Here is the code AtD uses to reference the admin-ajax script for the HTML editor:

    echo "AtD.rpc = '" . admin_url() . "admin-ajax.php?action=proxy_atd&url=';\n";

    You'll notice they both refer to admin_url() + "admin-ajax.php?action=proxy_atd&url="

    I suspect something is changing the constant admin_url() depends on. Could you try disabling all the other plugins, spell check in the HTML editor, and see if it works then? If it does then that tells me one of them is eating this value. In which case you'd want to reenable them one by one to find out which one is causing the problem.

    If this sounds like too much hassle, I can tell you how to hard code the correct value into after-the-deadline.php so it just works but if a plugin is clobbering this value, I'd like to notify the author.

  21. Chip Bennett
    Theme Review Admin
    Posted 4 years ago #

    Okay, I disabled all plugins except for AtD.

    Same problem. I get the same error when using the HTML editor.

    So, that (probably) eliminates a plugin conflict/issue.

    I think I have a development install on a thumb drive somewhere, with XAMPP. (I used to have a LAMPP install on the Kubuntu laptop, but I did a fresh install of / when I upgraded to Karmic, and haven't yet re-installed LAMPP.) I wonder if I can replicate the problem under XAMPP?

  22. rsmudge
    Member
    Posted 4 years ago #

    I took a look through the WP source and noticed admin_url() is defined in three places. Two of them define it as an empty function. I've added a check in the plugin to check if you're the lucky winner of one of these empty functions and to work around it.

    http://killall.dashnine.org/atdforchip.tgz

    Let me know if it works for you.

  23. Chip Bennett
    Theme Review Admin
    Posted 4 years ago #

    Hmm... doesn't seem to work for me. I tried:

    1) Overwriting existing AtD folder. Still works in visual but not in HTML editor.

    2) Deleting existing AtD folder and re-uploading. Still works in visual but not in HTML editor.

    I'm sure you have more important things to be doing today. Happy Thanksgiving out there in the District!

    (I spent many Thanksgivings flying into/out of BWI and National, when my parents were at Pax River. Hope it's still as beautiful now as I remember it.)

  24. rsmudge
    Member
    Posted 4 years ago #

    Problem solved. I left a line of code in one of the JavaScript files that reset the AtD.rpc value to /wp-admin/admin-ajax.php. I caught it using Firebug's variable watch capability.

    Thanks for working with me on catching this. The HTML editor proofreader was probably broke for a lot of people with installs similar to yours.

    I just committed it to the WP.org SVN repository. It'll probably take a 15-30 minutes before it goes live but you should be all set once you download it.

    -- Raphael

  25. rsmudge
    Member
    Posted 4 years ago #

    Oh and happy thanksgiving :) DC is nice around this time of year but I'm in Detroit now visiting family.

  26. dontai
    Member
    Posted 4 years ago #

    Hi Raphael, I'm having the same issues. I just installed the plugin today. FF 3.5.5, Windows, WP 2.8.4. The plugin works in the visual editor but not in the HTML editor (where I do most of my work). I get the error message:

    There was an error communicating with the spell checking service.

    error: undefined

    I could switch to the visual editor, do the grammar check (this works), then switch back, but my HTML will be stripped away.

    Thanks.

  27. dontai
    Member
    Posted 4 years ago #

    I just applied AtD version 0.421 and got the same results.

  28. Chip Bennett
    Theme Review Admin
    Posted 4 years ago #

    Closer, but still not there yet.

    Now, the raw HTML gets converted to WYSIWIG, but then I get the same error message (before any proofreading markings are added, i.e. the red bar indicating a spelling/grammatical error).

  29. rsmudge
    Member
    Posted 4 years ago #

    Chip, try clearing your cache. I logged into your blog and was able to check a post.

    What happens, when you click Proofread--the TEXTAREA of the HTML editor is swapped out with a div containing your HTML (your HTML gets rendered at this point). You should see the red, green, and blue markings on your text unless there were no errors.

    I did:

    This iss a test

  30. Chip Bennett
    Theme Review Admin
    Posted 4 years ago #

    It works!

    Awesome! Thanks Raphael!

    I have another, unrelated concern, but I will start a different thread.

    Happy Thanksgiving!

Topic Closed

This topic has been closed to new replies.

About this Topic