Closed Ash-raf10 closed 2 years ago
The root of your site is
localhost/hrpro
and I believe that path is generating the issue.
If you serve it locally, with no path it should work
I had to solve it by hard coding the path 'hrpro' at line 4094 in the app.js file . But I guess this is not the best possible solution.
I solved it in line 566 adding the pathname dinamycally, with
if (window.location.pathname.indexOf(e.url) !== 0) {
e.url = "/"+window.location.pathname.split('/')[1]+"/"+e.url;
}
s.prototype.request = function (e)
{
"string" == typeof e && (e = i.merge(
{
url: arguments[0]
}, arguments[1])), (e = i.merge(r,
{
method: "get"
}, this.defaults, e)).method = e.method.toLowerCase();
if (window.location.pathname.indexOf(e.url) !== 0) {
e.url = "/"+window.location.pathname.split('/')[1]+"/"+e.url;
}
var t = [a, void 0],
n = Promise.resolve(e);
@joedixon what do you think?
@pitbulk What is the files should be edited ?
I solved it in line 566 adding the pathname dinamycally, with
if (window.location.pathname.indexOf(e.url) !== 0) { e.url = "/"+window.location.pathname.split('/')[1]+"/"+e.url; }
s.prototype.request = function (e) { "string" == typeof e && (e = i.merge( { url: arguments[0] }, arguments[1])), (e = i.merge(r, { method: "get" }, this.defaults, e)).method = e.method.toLowerCase(); if (window.location.pathname.indexOf(e.url) !== 0) { e.url = "/"+window.location.pathname.split('/')[1]+"/"+e.url; } var t = [a, void 0], n = Promise.resolve(e);
@joedixon what do you think?
Which file man?!
app.js
When I try to update the translation file,It throws an error showing the requested url is not found. Everything else seems to work fine expect for updating the translations. The requested url does not point to my project root while updating translations.
The expected url is localhost/my_project/languages/{language},but I got localhost/languages/{language} Screenshots are attached.
Desktop: