On several test environments, I can't manage my albums. I get this in the javascript console:

```
TypeError: undefined is not an object (evaluating 'node.parent')
```

It refers to this piece of code in `albums.js` :

```
    var url_split = window.location.href.split("cat_move");
    var catToOpen = url_split[url_split.length - 1].split("-")[1];
    console.log(catToOpen);
    if (catToOpen && isNumeric(catToOpen)) {
        nodeToGo = $('.tree').tree('getNodeById', catToOpen);
        goToNode(nodeToGo, nodeToGo);
        if (nodeToGo.children) {
            $(".tree").tree("openNode", nodeToGo, false);
        }
    }
```

The problem is that it tries to find an album id in the URL which is supposed to be like `http://domain.tld/admin.php?page=albums&parent_id=2#cat-2` and it assumes there is only one legit "-" in this URL. Which is totally not sure. In my case, the domain name is something like `server.ip-1-2-3-4.tld`. Good luck with that.

The search for the album id should not rely on parsing the URL.
[albums] undefined node.parent
This is a GitHub Issue
repo:Piwigo
owner:Piwigo
Title : [albums] undefined node.parent
Issue date:

--- start body ---
On several test environments, I can't manage my albums. I get this in the javascript console:

```
TypeError: undefined is not an object (evaluating 'node.parent')
```

It refers to this piece of code in `albums.js` :

```
    var url_split = window.location.href.split("cat_move");
    var catToOpen = url_split[url_split.length - 1].split("-")[1];
    console.log(catToOpen);
    if (catToOpen && isNumeric(catToOpen)) {
        nodeToGo = $('.tree').tree('getNodeById', catToOpen);
        goToNode(nodeToGo, nodeToGo);
        if (nodeToGo.children) {
            $(".tree").tree("openNode", nodeToGo, false);
        }
    }
```

The problem is that it tries to find an album id in the URL which is supposed to be like `http://domain.tld/admin.php?page=albums&parent_id=2#cat-2` and it assumes there is only one legit "-" in this URL. Which is totally not sure. In my case, the domain name is something like `server.ip-1-2-3-4.tld`. Good luck with that.

The search for the album id should not rely on parsing the URL.
--- end body ---
