We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6947
    • 8 Posts
      Not sure if this is an issue with my MODx configuration or TinyMCE so I thought I would ask in this sub-forum first...

      Site info:
      Modx: 1.0.5
      PHP: 5.3.6
      MySQL: 5.1.56
      Apache: 2.2.17
      Browser: Chrome, FF4/FF3, IE8 etc.
      Server: VPS hosting, Cpanel v. 11.28.87, 2.6.18-194.8.1.el5.028stab070.5 kernel
      Configuration warning:
      Configuration warning: ’GD and/or Zip PHP extensions not found’
      What does this mean?
      MODx needs the GD and Zip extension enabled for PHP. While MODx will work without them, you will not be able to take full advantage of the built-in File Manager, Image Editor or Captcha for logins.
      --I am working on sorting this out. Not sure if its relevant to this issue.


      Recently upgraded from super old 0.9.6 to the latest version of Evolution.

      When I try to add or edit links using TinyMCE while editing pages I get a number of odd behaviours.

      1) When inserting media (e.g. link to a PDF I uploaded previously), the link manager popup fails to get the URL of the item I selected from the files folder.
      2) Manually inserting the link results in the following:

      The file in question can be found at

      http://mydomain.com/assets/files/document.pdf

      When the page is rendered the link comes out as

      http://mydomain.com/"http://mydomain.com/assets/files/document.pdf"

      3)Going back to edit the link using the TinyMCE thing shows that the link simply points to "\". I had to insert the url using the edit HTML feature.

      4)Similarly, offsite links appear in quotes, subordinate to the site domain e.g.

      http://mydomain.com/"http://www.google.com"

      Not entirely sure what is going on here, is it a mod-rewrite thing? Where should I be looking.

      Any tips much appreciated
      Best
      D
      [list]


    [/list]
      • 21257 MODX Staff
      • 730 Posts
      Can you paste your TinyMCE plugin configuration here?
      It’s at Elements > Manage Elements > on the Plugins tab > TinyMCE Rich Text Editor > on the Configuration tab > Plugin Configuration
      It may be using a really old set of configuration parameters.

      Mine, in an unmodified install, is
      &customparams=Custom Parameters;textarea; &mce_formats=Block Formats;text;p,h1,h2,h3,h4,h5,h6,div,blockquote,code,pre &entity_encoding=Entity Encoding;list;named,numeric,raw;named &entities=Entities;text; &mce_path_options=Path Options;list;rootrelative,docrelative,fullpathurl;docrelative &mce_resizing=Advanced Resizing;list;true,false;true &disabledButtons=Disabled Buttons;text; &link_list=Link List;list;enabled,disabled;enabled &webtheme=Web Theme;list;simple,editor,creative,custom;simple &webPlugins=Web Plugins;text;style,advimage,advlink,searchreplace,contextmenu,paste,fullscreen,nonbreaking,xhtmlxtras,visualchars,media &webButtons1=Web Buttons 1;text;undo,redo,selectall,|,pastetext,pasteword,|,search,replace,|,nonbreaking,hr,charmap,|,image,link,unlink,anchor,media,|,cleanup,removeformat,|,fullscreen,code,help &webButtons2=Web Buttons 2;text;bold,italic,underline,strikethrough,sub,sup,|,|,blockquote,bullist,numlist,outdent,indent,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,|,styleprops,marf &webButtons3=Web Buttons 3;text; &webButtons4=Web Buttons 4;text; &webAlign=Web Toolbar Alignment;list;ltr,rtl;ltr &width=Width;text;100% &height=Height;text;400
      
        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
        • 6947
        • 8 Posts
        Sorry for the delay in my response, I have been out of the office quite a bit recently.

        Side point update - GD and PHP Zip seem to be back up and running, not sure what happened, one of the admins must have tweaked the PHP compile options or something.

        Anyway, my config for TinyMCE looks like this:

        &customparams=Custom Parameters;textarea; &tinyFormats=Block Formats;text;p,h1,h2,h3,h4,h5,h6,div,blockquote,code,pre,address &entity_encoding=Entity Encoding;list;named,numeric,raw;named &entities=Entities;text; &tinyPathOptions=Path Options;list;rootrelative,docrelative,fullpathurl;docrelative &tinyCleanup=Cleanup;list;enabled,disabled;enabled &tinyResizing=Advanced Resizing;list;true,false;false &advimage_styles=Advanced Image Styles;text; &advlink_styles=Advanced Link Styles;text; &disabledButtons=Disabled Buttons;text; &tinyLinkList=Link List;list;enabled,disabled;enabled &webtheme=Web Theme;list;simple,advanced,editor,custom;simple &webPlugins=Web Plugins;text;style,advimage,advlink,searchreplace,print,contextmenu,paste,fullscreen,nonbreaking,xhtmlxtras,visualchars,media &webButtons1=Web Buttons 1;text;undo,redo,selectall,separator,pastetext,pasteword,separator,search,replace,separator,nonbreaking,hr,charmap,separator,image,link,unlink,anchor,media,separator,cleanup,removeformat,separator,fullscreen,print,code,help &webButtons2=Web Buttons 2;text;bold,italic,underline,strikethrough,sub,sup,separator,separator,blockquote,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect,separator,styleprops &webButtons3=Web Buttons 3;text; &webButtons4=Web Buttons 4;text; &webAlign=Web Toolbar Alignment;list;ltr,rtl;ltr


        I swapped out my config with the one posted above, which resulted in the following error, when trying to edit a page (and load TinyMCE):
        TinyMCE - OnRichTextEditorRegister
        An error occurred while loading. Please see the event log for more information.
        
        Parse error: syntax error, unexpected '"', expecting T_STRING in /home/ckts/public_html/manager/includes/document.parser.class.inc.php(790) : eval()'d code on line 13
        TinyMCE - OnRichTextEditorInit
        An error occurred while loading. Please see the event log for more information.
        
        Parse error: syntax error, unexpected '"', expecting T_STRING in /home/ckts/public_html/manager/includes/document.parser.class.inc.php(790) : eval()'d code on line 13
        
        


        It did though let me see the underlying html for the page - for example:
        <a href=\"assets/files/myfile.pdf\">Link Text</a></p>


        Looks like an extra "\" is appearing in front of the link text, which would explain how the entire site URL is getting in there, I guess.

        Any more ideas; I’m not sure what to make of the config stuff, I have no experience messing around with TinyMCE, it has always just been there and worked!

        Thanks again
        D

          • 6947
          • 8 Posts
          OK, I did a little digging around and found this forum post:

          http://modxcms.com/forums/index.php?topic=61464.0

          TL;DR - PHP Magic Quotes was making things break.

          So I turned off magic quotes but now I have a new issue - I am unsure, however - whether the problem is related to the change I made or not.

          Once I login to the manager, I can’t edit any pages as before I can action anything I get logged out.

          As such I can’t actually check if the magic quotes thing fixes anything as I get logged out before I can take a look, grr!

          I turned magic quotes back on again, but, that didn’t seem to make any difference.

          The pattern seems to be, that I get logged out if the page I am asking for requires authentication and/or new information from the back end. AJAX type requests seem to be fine, but if I actually try to look at or save anything which requires privileges then I get bumped off.

          Now I’ve had a read around about this and there is alot of talk about shared sessions and where sessions get saved on shared hosting but this site has been installed and running on this server for *ages* and I have never had any trouble like this before.

          Any ideas?
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            You probably need to clear your browser cache and cookies for the domain. It does sound like the hosting company did an upgrade or some other maintenance and changed things. Magic quotes should definitely be turned OFF.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 6947
              • 8 Posts
              Cleared my cache and cookies and so on, error persists; get logged out when attempting to edit things.

              Magic quotes are off.

              Also tried it from a different machine/IP/browser - still getting logged out.

              Could it be anything else?
                • 6947
                • 8 Posts
                In my PHP.ini I set the following:

                session.gc_maxlifetime = 28800
                session.save_path = /home/~ckts/tmp/sessions


                and with that set I don’t get logged out of the manager but I do get this appearing on all the pages:

                Warning: session_start() [function.session-start]: open(/home//sess_59593bcf9e0ac8eee1e66a43ddbd53f1, O_RDWR) failed: Permission denied (13) in /home/ckts/public_html/manager/includes/config.inc.php on line 60

                and

                « MODx Parse Error »
                MODx encountered the following error while attempting to parse the requested resource:
                « PHP Parse Error »

                PHP error debug
                Error: Unknown: open(/home//sess_59593bcf9e0ac8eee1e66a43ddbd53f1, O_RDWR) failed: Permission denied (13)
                Error type/ Nr.: Warning - 2
                File: Unknown
                Line: 0

                Parser timing
                MySQL: 0.0094 s (16 Requests)
                PHP: 0.0625 s
                Total: 0.0719 s

                While I was able to edit pages and so on with that session setting, turns out my little issues with the links not being rendered properly still persists. Back to square one. Maybe even negative one - I have more problems now then when I started :sadface:

                I thought there was a read/write issue with the folder I picked for saving my sessions in - but even when I set it to 777, it still comes back to me with Permission Denied.

                What now?
                Thanks folks
                D
                  • 21257 MODX Staff
                  • 730 Posts
                  If you look at the error, it’s trying to work with the file called
                  /home//sess_59593bcf9e0ac8eee1e66a43ddbd53f1
                  which shows me that the path you wanted to set (/home/~ckts/tmp/sessions) isn’t specified correctly - it must not like the tilde or something.

                  As far as magic_quotes_gpc goes.. just turning the setting Off doesn’t remove the backslashes from the database - you’ll have to manually find and remove any that have been introduced while this problem persisted.
                    Mike Schell
                    Lead Developer, MODX Cloud
                    Email: [email protected]
                    GitHub: https://github.com/netProphET/
                    Twitter: @mkschell