We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27733
    • 99 Posts
    I stop short of calling this a bug, but I’ve found an interesting and inconveniencing behavior recently: Upon importing a large group of xhtml docs (that for the most part contained clean, valid code) a handful with some bogus code made it in, but cannot be deleted. Namely, these docs had two sets of <title></title> tags. These did import into modx without error. However, the front-end clearly doesn’t like it, as the documents are un-editable from the doc tree. No action happens upon clicking the doc titles and, when right-clicking, the browser contextual menu appears (no modx contextual menu as you’d usually see).

    So this post has two purposes—

    • to bring the issue to light and suggest further developing the import function to use more discretion about what it will accept, and
    • to ask how best to delete these records ... is it only the "{prefix}_site_content" table that I need to alter (I’m assuming I’ll have to alter the records directly in mysql)?

    On point one, I wish-wish-wish I could contribute by offering solutions myself ... but I only have novice knowledge of PHP.

    Thanks for any assistance y’all can offer!
      ------
      Server: *nix, ModX Evo 1.0.4, Apache 2.x, PHP 5.x, Mysql 5.x.
      • 32646
      • 87 Posts
      Where is the problem? In the document content or the title/longtitle? If you go in with phpMyAdmin you should find it in {prefix}_site_content and then the content or pagetitle field.

      It would be interesting to see a screenshot of this. I imported a lot of html, but I cleaned all the headers and footers out first.
        Just learning the ropes.
        • 27733
        • 99 Posts
        Well, shortly after my original post, I got an install of phpmyadmin running and deleted the affected docs. I’ve since gotten around to repeating the problem and cannot say for sure what’s caused it, other than something "buggy" in the files themselves. In the end, what I’ve found:


        • creating a new document, with two sets of <title> tags, did not reproduce the problem...the system simply inserted the first title as the pagetitle and discarded the second
        • copying the exact content of an affected file and saving it into a new file averted the import problem
        • simply changing the name of the original file averted the problem as well

        So, I’d conclude this probably has nothing to do with the modx import mechanism. Attached is the original file, should anyone want to replicate the problem I had. Also, attached are images of the database record of this file after import.
          ------
          Server: *nix, ModX Evo 1.0.4, Apache 2.x, PHP 5.x, Mysql 5.x.