Closed ramtinms closed 10 years ago
We just merged all the domain code, which makefile did you use? Probably the live site is still from before the merge.
I am using the final version of Make file in the master branch (after merging) (Hash Code : 121b3d6) in the frontend directory.
Sry I am using cd3fa43 , but I have "prepareReplacements is not defined " in wikipediahistory.js file
Use the makefiles in domains/ now, the one in frontend/ expects the config files to be setup in the same directory. Although I'm not sure exactly why you are getting that error instead of it not finding the config.
The problem changed to "Cannot call method 'split' of undefined" , is it the final structure or is it going to change?
The general code structure should be fixed now. Did you do a fresh checkout, or is there any chance you have old config files around? If you were able to run the makefile in frontend/ at all I think it might be using the wrong code.
I did a fresh checkout and clone in new directory. I don’t have any file from past in that directory
Ramtin Mehdizadeh Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Friday, 21 February 2014 at 00:05, Max Whitney wrote:
The general code structure should be fixed now. Did you do a fresh checkout, or is there any chance you have old config files around? If you were able to run the makefile in frontend/ at all I think it might be using the wrong code.
— Reply to this email directly or view it on GitHub (https://github.com/sfu-natlang/lensingwikipedia/issues/100#issuecomment-35706694).
What about the backend and data? Any chance that the frontend is getting old data (especially pre-#95)?
I changed the server config to http://lensingwikipedia.cs.sfu.ca/ , (according to wireshark) it is receiving the data but the front-end gets error for split() function, Maybe it is a problem with Chrome Browser.
the website.md file contains the instructions. although it may need to be updated
It looks like website.md hasn't been updated for either the config file refactoring or the move to domains/, but frontend/README should be current. The main changes are:
The main problem with offline version is that on our current version , cross-site HTTP requests are not accepted (When using browsers). So we can not receive informations from back-end servers when using browsers but it is accessible by using terminal.
The solution is to add to the back-end header response. Access-Control-Allow-Origin: *
But the question is that is it Ok to make this change and change the access control for cross-site HTTP requests, in other words is it okey to let other sites to send a query to our back-end?
more information in : https://developer.mozilla.org/en/docs/HTTP/Access_control_CORS
Ramtin Mehdizadeh
On Friday, 21 February 2014 at 08:27, Max Whitney wrote:
It looks like website.md (http://website.md) hasn't been updated for either the config file refactoring or the move to domains/, but frontend/README should be current. The main changes are: Run the appropriate makefile in domains/ instead of in frontend/ directly. No configuration is strictly required now, but in general you'd want to set backendUrl. The simplest way is to run the makefile once and then edit frontendsettings.js.
— Reply to this email directly or view it on GitHub (https://github.com/sfu-natlang/lensingwikipedia/issues/100#issuecomment-35746529).
@ramtinms to clarify: you are running the frontend on a different machine from the backend and this is the issue?
where does one add that header to allow cross-site requests? is it in the httpd conf files for natlang-web.cs.sfu.ca or in the python code that issues queries?
Yes
I think it can be done in python code in backend.
Ramtin Mehdizadeh
On Tuesday, 25 February 2014 at 11:50, Anoop Sarkar wrote:
@ramtinms (https://github.com/ramtinms) to clarify: you are running the frontend on a different machine from the backend and this is the issue?
where does one add that header to allow cross-site requests? is it in the httpd conf files for natlang-web.cs.sfu.ca (http://web.cs.sfu.ca) or in the python code that issues queries?— Reply to this email directly or view it on GitHub (https://github.com/sfu-natlang/lensingwikipedia/issues/100#issuecomment-36049956).
I think we can allow this. @theq629 do you see any problems?
That's fine as long as you are ok with the security for that.
However, I am currently able to use the live backend from a site hosted on my laptop. I get the same split error, which is happening because the live backend is not providing the eventSpan. Presumably the current live site is from before the changes at #95.
Also, isn't the cross site access control at least partially on the browser side too? If I remember correctly I get errors for that if I load the site from file://, but not if I serve it locally and access it as http://.
I think If there is no cross site access control flag on the header of the response from server packet , Browsers ( I checked google chrome) will not let you access the data.
For the browser side I am using MAMP for local virtual hosting and this command to permit my chrome to work with cross site access control flag :
open -a 'Google Chrome' --args -allow-file-access-from-files
Ramtin Mehdizadeh
On Tuesday, 25 February 2014 at 17:11, Max Whitney wrote:
Also, isn't the cross site access control at least partially on the browser side too? If I remember correctly I get errors for that if I load the site from file://, but not if I serve it locally and access it as http://.
— Reply to this email directly or view it on GitHub (https://github.com/sfu-natlang/lensingwikipedia/issues/100#issuecomment-36079877).
Ok, in that case we should probably have an option to add the header. Isn't this a separate issue, though? If you are getting as far as the split error I'm pretty sure it is getting data from the backend.
@ramtinms can we close this issue? or is it still unresolved?
For now it is solved but I think we need to design a better structure for different domains that can be a new topic.
Ramtin Mehdizadeh Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Sunday, 16 March 2014 at 06:13, Anoop Sarkar wrote:
@ramtinms (https://github.com/ramtinms) can we close this issue? or is it still unresolved?
— Reply to this email directly or view it on GitHub (https://github.com/sfu-natlang/lensingwikipedia/issues/100#issuecomment-37756718).
I am trying to run a local version of site on my laptop. I clone from the Master branch and compile the code using Makefile (Using devel option) and set the backend query server.
I am facing a problem with parsing results of query and the problems is in the wikipediahistory.js file (error : "Cannot call method 'split' of undefined") and when I compare it to the online website , it seems that this file is really different.