We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27592
    • 2 Posts
    Hello,

    I’m trying to manually create document within a manager. I’m able to post it in database, generate alias, but when I try to access the document by using its alias it throws me an error. But I’m able access it after I view it in manager and click Save. What should I do? BTW, I’m also updating siteCache file, but it doesn’t help.

    Thanks,
    Alexander.
      • 33968
      • 863 Posts
      Have you enabled friendly urls, both in System Settings and your .htaccess file?
        • 27592
        • 2 Posts
        Quote from: lucas at Jul 14, 2011, 04:42 AM

        Have you enabled friendly urls, both in System Settings and your .htaccess file?

        Yes, sure. The problem is that it works when I save it inside manager, but doesn’t work if I save it in DB.
          • 33968
          • 863 Posts
          What do you mean by ’save it in DB’ - are you using a front end form to create a resource? Or creating resources directly in the database?
            • 27592
            • 2 Posts
            Quote from: lucas at Jul 14, 2011, 05:27 AM

            What do you mean by ’save it in DB’ - are you using a front end form to create a resource? Or creating resources directly in the database?

            I’m using standard mysql query INSERT INTO [sitename]_site_content.
              • 33968
              • 863 Posts
              Evo or Revo?
                • 27592
                • 2 Posts
                Quote from: lucas at Jul 14, 2011, 02:15 PM

                Evo or Revo?

                Evo smiley
                  • 33968
                  • 863 Posts
                  What happens if you do your MySql insert... then rather than editing the SiteCache file yourself, clear the cache using the button in the manager and have MODx build the cache again?
                    • 27592
                    • 2 Posts
                    Quote from: lucas at Jul 15, 2011, 03:27 AM

                    What happens if you do your MySql insert... then rather than editing the SiteCache file yourself, clear the cache using the button in the manager and have MODx build the cache again?

                    The problem is that I don’t want to clear cache through the manager, I want users to be able to create content within manager, but all materials must be there.

                    When I do MySQL insert, content appears in DB and it appears in manager as well, but I can’t access it using full link (i.e. site.name/content-alias) only after I click Save button in manager.
                      • 33968
                      • 863 Posts
                      I was just suggesting to try clearing the cache once and see if the alias paths are generated correctly. If they are, then you know the problem is happening when you manually update the cache. I don’t understand why you want to avoid clearing the cache either.

                      I’m afraid you’ve lost me as to what you’re trying to achieve though. If users will be creating (I think you mean editing) content within the manager, then surely they will be clicking the save button anyway? You’ve said already that this fixes the issue huh