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

    i’m using docmanager to create some new documents, but am getting strange behaviour. i’m using FURLs, and am setting an alias in the documents i’m creating. the new documents are created fine, but wayfinder is generating addresses based on the document ids.

    for example, imagine i have the following documents created already (example doc ids in brackets):

    world (1)
      - uk (2)
        - london (3)
    

    and i try to create a new sub-tree to give me:

    world (1)
      - uk (2)
        - london (3)
        - the north (4)
            - manchester (5)
    

    i’m setting aliases to give me FURLs like http://www.example.com/world/uk/london.html. however, the new documents end up with addresses like http://www.example.com/4.html for some reason. these addresses don’t work, and when i manually type in http://www.example.com/world/uk/the-north/manchester.html, this doesn’t work either.

    the odd thing is that if i then go into the manager, open any document, and without even having to make any changes, save it again, this corrects all of the FURLs.

    why this might happen? how are FURLs computed? i’ve tried looking into the site_content table, but can’t see any errors (i’m setting up parents and folders as required). i think it might be something to do with the aliasListing array not being updated in the document parser, since all the other FURLs keep working. How can I regenerate aliasListing (if this is in fact the problem)?

    thanks
      • 24719
      • 194 Posts
      solved thanks to newspublisher. it was a caching problem, fixed with the following code:
      include_once $modx->config['base_path']."manager/processors/cache_sync.class.processor.php";
      $sync = new synccache();
      $sync->setCachepath("assets/cache/");
      $sync->setReport(false);
      $sync->emptyCache(); // empty the cache to regenerate FURLs