Acumatica Sitemap JS ошибка при попытке добавить ссылку в меню 2017 r2 - PullRequest
0 голосов
/ 22 мая 2019

Мы пытаемся добавить ссылки на меню в нашу карту сайта (что мы делаем уже год), и мы внезапно видим проблемы с блокировкой, когда ничего не отображается после нажатия на «Добавить пункт меню»

enter image description here

В консоли также есть ошибки js (см. Ниже). Ошибка при попытке нажать «Добавить пункт меню»

Снимок экрана консоли здесь и скопируйте вставку ниже

enter image description here

Вот функция getScreenUrl - но я считаю, что это часть Acumatica, поэтому я не уверен, как решить эту проблему.

TypeError: Cannot read property 'lastIndexOf' of undefined
    at Object.getScreenUrl (site.js:1391)
    at site.js:3245
    at Array.map (<anonymous>)
    at site.js:3242
    at Array.map (<anonymous>)
    at Object.render (site.js:3211)
    at k (PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:85)
    at beginWork (PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:88)
    at e (PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:59)
    at k (PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:60)
T @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:64
Q @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:61
ed @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:65
fb @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:64
updateContainer @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:238
(anonymous) @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:146
unbatchedUpdates @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:67
Bb @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:146
render @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:244
renderScreensToSelect @ site.js:1972
(anonymous) @ site.js:544
dispatch @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:3
q.handle @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:3
PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:62 Uncaught TypeError: Cannot read property 'lastIndexOf' of undefined
    at Object.getScreenUrl (site.js:1391)
    at site.js:3245
    at Array.map (<anonymous>)
    at site.js:3242
    at Array.map (<anonymous>)
    at Object.render (site.js:3211)
    at k (PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:85)
    at beginWork (PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:88)
    at e (PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:59)
    at k (PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:60)
getScreenUrl @ site.js:1391
(anonymous) @ site.js:3245
(anonymous) @ site.js:3242
render @ site.js:3211
k @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:85
beginWork @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:88
e @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:59
k @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:60
Q @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:61
ed @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:65
fb @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:64
updateContainer @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:238
(anonymous) @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:146
unbatchedUpdates @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:67
Bb @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:146
render @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:244
renderScreensToSelect @ site.js:1972
(anonymous) @ site.js:544
dispatch @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:3
q.handle @ PX.ScriptBatch.axd?d=cFBYLldlYi5VSXxQWC5XZWIuVUkuRXh00&t=636631681020000000:3


    getScreenUrl: function (url)
    {
        var start = url.lastIndexOf('/') + 1, end = url.indexOf('?', start);
        if (end < 0) return url.substring(start).toLowerCase();

        var query = url.split('?')[1], query2 = new Array();
        if (query)
        {
            var params = query.split('&');
            for (var i = 0; i < params.length; i++)
            {
                var pair = params[i].split('='), name = pair[0].toLowerCase();
                if (this.__systemParams.indexOf(name) < 0) query2.push(params[i]);
            }
        }

        if (query2.length == 0) return url.substring(start, end).toLowerCase();
        return (url.substring(start, end) + '?' + query2.join('&')).toLowerCase();
    },
...