We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22770
    • 285 Posts
    I’m having a problem with using @INHERIT in 0.9.6.3.

    I have a rich text TV with a default value of @INHERIT. In the previous version of MODX that I was using (0.9.6.1), the TV worked exactly how I expected it to; it inherited the value of the TV in the parent.

    Now that I’ve upgraded, however, if I make a change to the page, the inherited value is replaced by the text ’@INHERIT’ (in paragraph tags). In other words, it’s not inheriting.

    I don’t know if this is a 0.9.6.3 problem or if it’s being caused by the upgraded TinyMCE (I was using 2.1.2 before), but does anyone have a solution? (If I delete the text ’@INHERIT’ from the TV, then it in inherits properly, but I have to do this every time I save, so it’s not a solution.)
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: PatrickSamphire at Jan 08, 2009, 07:55 AM

      Now that I’ve upgraded, however, if I make a change to the page, the inherited value is replaced by the text ’@INHERIT’ (in paragraph tags). In other words, it’s not inheriting.

      I don’t know if this is a 0.9.6.3 problem or if it’s being caused by the upgraded TinyMCE (I was using 2.1.2 before), but does anyone have a solution? (If I delete the text ’@INHERIT’ from the TV, then it in inherits properly, but I have to do this every time I save, so it’s not a solution.)
      I don’t know what’s causing it either, but this (and similar artifacts with various other MODx tags) has been an issue for those editing with rich-text editors since day one AFAIK. Just edit the source (i.e. don’t use the RTE) to take out the extra text that TinyMCE is surrounding @INHERIT with and that should solve the issue. Perhaps someone who uses TinyMCE can suggest a way to tweak the configuration to prevent this from happening?
        • 10449
        • 956 Posts
        I always disable "auto cleanup" in the tinyMCE config. That "feature" always adds some junk in HTML, e.g. mce_href tags or empty paragraph tags.
          • 22770
          • 285 Posts
          I’ve tried disabling the auto-cleanup, and also deleting the paragraph tags that TinyMCE places around the @INHERIT, but neither of these works, and the paragraph tags keep reappearing.

          It strikes me that this is new feature in the current version of TinyMCE. In the versions I previously used, a single line of text typed into TinyMCE would be unformatted text by default. Now, a single line or text becomes a paragraph by default. In most cases, this is great, but in the case of @INHERIT or other bindings, it screws things up. Anyone know how this might be reversed?

          Otherwise, I guess my only alternatives are to make this a plain text TV (not great for editing) or to revert to an earlier version of TinyMCE.

          Relating to that, is reverting to a previous version as simple as disabling the current version and enabling the previous version, or does it need more than that?

          Maybe I should be asking this in the RTE part of the forum.
            • 25663 MODX Staff
            • 12,272 Posts
            Moving to RTE section.
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 16610
              • 634 Posts
                Mikko Lammi, Owner at Maagit
                • 22770
                • 285 Posts
                Quote from: Lammikko at Jan 12, 2009, 10:17 AM

                Maybe this solves your problem: http://modxcms.com/forums/index.php/topic,28908.0.html

                That looks exactly like the solution. A shame there’s no obvious way to disable it only for certain elements, because it’s useful for plain text, but at least it solves my problem.

                Thanks.