We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50190
    • 6 Posts
    Hi

    I've run in to an issue where if I try and input any HTML into my custom extra and click save, it will just load forever.

    The data saves into the database but I get weird results in my console.

    Console error on save:


    Console error details:



    Whole output:
    ({"success":true,"message":"","total":0,"data":[],"object":{"id":18,"title":"<p>t<\/p>","start_date":"-1-11-30","end_date":"-1-11-30","num_nights":"t","listing_image":"","listing_text":"","price_summary":"","new_icon":0,"book_online":0,"book_online_link":"","image_slider":0,"image_1":"","image_2":"","image_3":"","image_4":"","detail_text":"","terms":"","show_on_homepage_derwent":0,"show_on_homepage_victoria":0,"show_on_homepage_carlton":0,"show_on_homepage_toorak":0,"whats_on":"","sort_order":0,"break_types":"","special_offer_types":"","non_price_offers":"","ext-comp-1303":"20","action":"mgr\/breaks\/update"}}</p>)


    *Note above that there is an extra </p> added at the end of the line from somewhere.

    No matter what type of field I try to add HTML I get the same result.

    Is there anymore information I can give you?

    Thanks in advance!

    Jack


    Edit / Extra info:
    - I'm not modifying any data in any processor.
    - The </p> seems to be encoded and something is noticing that there's a missing </p> and appending it by the looks of it.
    - Same issue if I just use a
    <br />
    tag. Here's the output for that error:
    ({"success":true,"message":"","total":0,"data":[],"object":{"id":18,"title":"test<br \="">","start_date":"-1-11-30","end_date":"-1-11-30","num_nights":"t","listing_image":"","listing_text":"","price_summary":"","new_icon":0,"book_online":0,"book_online_link":"","image_slider":0,"image_1":"","image_2":"","image_3":"","image_4":"","detail_text":"","terms":"","show_on_homepage_derwent":0,"show_on_homepage_victoria":0,"show_on_homepage_carlton":0,"show_on_homepage_toorak":0,"whats_on":"","sort_order":0,"break_types":"","special_offer_types":"","non_price_offers":"","ext-comp-1199":"20","action":"mgr\/breaks\/update"}})
    [ed. note: ohitsmodx last edited this post 9 years ago.]
      • 50190
      • 6 Posts
      Replying so I'm emailed about responses.
        • 50190
        • 6 Posts
        Any suggestions?
          • 3749
          • 24,544 Posts
          MODX is definitely not adding the closing p tag. TinyMCE does that but I wouldn't think you'd be using a rich text editor for a title.

          Somewhere, your title is being checked with a regular expression that uses slashes as delimiters. The slash in front of the closing p tag is creating a premature close to the regex and the real / at the end is causing trouble.

          Knowing nothing at all about your custom extra, we can't really advise you on why this is happening.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting