We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29076
    • 615 Posts
    Quote from: BobRay at Jan 21, 2009, 04:46 PM

    Quote from: splittingred at Jan 21, 2009, 03:22 PM

    Quote from: BobRay at Jan 21, 2009, 11:40 AM

    I can open the Manager and log in in several different browsers, though I never do it. Is there any danger in doing work as the same admin user in several different concurrent sessions?
    I would hesitate to work in different browsers - because of session persistence issues - but I know from experience working in different tabs in the same browser is not an issue.

    Even if the other tabs are separate logins of the same user?
    I do that all the time. Usually I have three tabs open with the same manager at the same time. And it happends that I do separate logins for each tab.
    Sometimes it crashes in Firefox, but that is rare.

    And sometimes I login to the manager on different domains in different tabs, mabye several tabs for each domain. And it allmost never goes wrong.
      I think, thererfor I am! But what I am, and why...?
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: BobRay at Jan 21, 2009, 04:46 PM

      Even if the other tabs are separate logins of the same user?
      A single browser or client = one session. You cannot login to multiple user accounts at the same time using the same browser session. Only the most recent login will be respected and the session will be updated based on the most recent request.

      You would have to run multiple browser application instances in order to get unique sessions and thus, to maintain unique user identity.

      However, Revolution features the ability to login/logout of multiple contexts within a single user session. But the issue remains similar: unless you customize each context to use a different session cookie, you cannot login to multiple user accounts within a single browser session.
        • 3749
        • 24,544 Posts
        I think what Sylvaticus is talking about would not involve separate identities. All logins would be for the same user (main admin account), who might be editing a snippet in one tab and a resource in another tab. The question is, would both be saved properly with no bad side effects.

        BTW, it looks like Apache Wicket will allow different sessions for each browser tab:
        http://internna.blogspot.com/2008/10/http-sub-sessions-for-different-browser.html
        , though I don’t know enough about it to tell if would be of any use here.
          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
          • 3558
          • 7 Posts
          Why don’t you take snippets and templates out of the manager (and maybe also out of the db) and let us edit them in our favourite code editor? I hate it anyway to use these textareas with no syntax colors and no ability to use tabulators etc. I’d really prefer to write snippet code in a normal php file and upload these via ftp. This might also solve that multiple edit-windows problem.
            • 16183
            • 1,390 Posts
            Quote from: Bleda at Jan 22, 2009, 03:42 AM

            Why don’t you take snippets and templates out of the manager (and maybe also out of the db) and let us edit them in our favourite code editor? I hate it anyway to use these textareas with no syntax colors and no ability to use tabulators etc. I’d really prefer to write snippet code in a normal php file and upload these via ftp. This might also solve that multiple edit-windows problem.

            In the modx repository/forums you can find plugins that will syntax highlight the code for you as you edit it.

            You don’t have to store templates in the db - in the forums there are several step by step guides on how to use templates as includes, etc

            Sorry, don’t have the links to the above ATM - but they are there...

            cheers/k
              • 7923
              • 4,213 Posts
              Yes, you can already have everything in files and not in DB.. just create a snippet that uses php include_once to include a file from filesystem and have everything there. See for example this.

              EDIT: And it’s already planned that in some point Revolution will start supporting files straight from filesystem as resources, but I think it’s scheduled for 2.1


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 27708 MODX Staff
                • 2,502 Posts
                Quote from: Bleda at Jan 22, 2009, 03:42 AM

                Why don’t you take snippets and templates out of the manager (and maybe also out of the db) and let us edit them in our favourite code editor? I hate it anyway to use these textareas with no syntax colors and no ability to use tabulators etc. I’d really prefer to write snippet code in a normal php file and upload these via ftp. This might also solve that multiple edit-windows problem.

                AFAIK all resources (documents included) are to be decoupled from the db. It is the default location but personally I like having them in the DB.

                As far as editing is concerned, if you use Firefox you can use It’s All Text to send any textarea content to your favourite text editor and send it back on save. OR there is a plugin available to add Syntax HIghlighting and numbering to the RTE if you wanted to work there. Some people like this solution.

                That being said, MODx is so flexible that you can do whatever you want. I think if you are building out applications with MODx that using external files would required in the case of iterated designs using SVN etc.

                Since the 096x branch uses db based resources it makes sense to keep the same default behavior from a migration/updgrade perspective.



                  Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
                  • 3558
                  • 7 Posts
                  If you leave the choice to the user wether he keeps stuff in the db or in files would make me extremely happy. At least if I can choose to keep for example the contents and chunks in the db and snippets and templates as files.
                    • 27708 MODX Staff
                    • 2,502 Posts
                    One caveat is that you will either need a plugin or a snippet to call the snippet or template from a file. Although I think IIRC that you will be able to assign a file to a template somehow in Revo. If not it would be a great feature to use either the traditional MODx method or the file method as a config option.
                      Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
                      • 26903
                      • 1,336 Posts
                      Using files makes versioning harder IMHO, even if you tell people to us a VC system e.g. SVN they would still have to do a commit on every edit(plugin?). Most people wont want to set this up.
                        Use MODx, or the cat gets it!