We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3677
    • 130 Posts
    I’m stumped. I did the update first on staging with no issues. Repeated on production and everything completed but the friendly URLs are not resolving any more.
    Checked .htaccess rules. Cleared cache. Checked FURL system settings.

    Not sure what else to do. Is there anything else that might have changes with 2.1?

    -Brian
      • 3677
      • 130 Posts
      Decided to try restoring my db preupdate and running setup again.

      I’m getting an error message:
      Fatal error: Call to a member function getOption() on a non-object in /home/moaustin/public_html/core/model/modx/modresource.class.php on line 665

      I got this last time as well now that I think about it and when I re-run setup it completes the 2nd time.

      This is the code associated:
      public function getAliasPath($alias = ’’,array $fields = array()) {
              if (empty($fields)) $fields = $this->toArray();
              $workingContext = $this->xpdo->getContext($fields['context_key']);
              if (empty($fields['uri_override']) || empty($fields['uri'])) {
                  /* auto assign alias if using automatic_alias */
                  if (empty($alias) && $workingContext->getOption('automatic_alias', false)) {
                      $alias = $this->cleanAlias($fields['pagetitle']);
                  } elseif (empty($alias) && isset($fields['id']) && !empty($fields['id'])) {
                      $alias = $this->cleanAlias($fields['id']);
                  } else {
                      $alias = $this->cleanAlias($alias);
                  }

      -Brian
        • 3677
        • 130 Posts
        P.S. I have about 30 site contexts in my installation.
        Inside of each context there are resources that have the same friendly name as a resource in another context.
        I.e. /context1/help, context2/help, context3/help

        I’ve also noticed these new message when clearing the cache in 2.1:

        Resource URI already exists for resource id = 123; skipping duplicate resource URI for resource id = 122
        Resource URI already exists for resource id = 123; skipping duplicate resource URI for resource id = 121
        ...

        -Brian
          • 22303 MODX Staff
          • 10,725 Posts
          This indicates that a URI could not be properly calculated for Resource id 123 (IOW it’s probably blank or .html. If you have Resources without aliases and you do not have the automatic_alias setting enabled, this may be related.

          Another possibility is you do not have access to all the Contexts. A security fix in 2.1 now properly checks the load attribute for Contexts before they become available. Make sure your users have access to at least load all the Contexts, or this would cause the save to fail.