eker-huang / mathmlformula

Automatically exported from code.google.com/p/mathmlformula
0 stars 0 forks source link

Formula editor wont return the result in custom site path #93

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

What steps will reproduce the problem?
- In apache, Im using virtualhost, changing localhost/mysite to mysite.dev:8080

while using localhost everything is ok, but using mysite.dev:8080 , OK button 
just wont do anything (formula page wont close either). Debugging shows that on 
onOk event in fmath_formula.js is the problem. When using mysite.dev:8080, 
system cant find the iframeMathEditor.

onOk : function()
{
  var frame = document.getElementById('iframeMathmlEditor'+id).contentWindow;
            frame.saveImage(editor);
  return false;
},

What is the expected output? 
- formula editor work normally

What do you see instead?
- OK button just wont do anything.

What version of the product are you using? On what browser?
- CKEditor 3.6, browser chrome 35 and firefox 17

Regards,

Original issue reported on code.google.com by aries.wa...@gmail.com on 29 Oct 2014 at 6:41

GoogleCodeExporter commented 8 years ago
Hi,
The problem is the location to save/generate the image.
http://www.fmath.info/editor/image.jsp

There is a configuration file configMathMLEditor.xml with the property:
<property id="urlGenerateImage">/capture/imageCapture.jsp</property>
put:
urlGenerateImage=http://yoursite/folder/generateImage.jsp?param1=value
            // this is the url used to generate the image.
            // default is http://localhost/capture/imageCapture.jsp

Original comment by ionel.alexandru@gmail.com on 29 Oct 2014 at 1:10

GoogleCodeExporter commented 8 years ago
After you change the file configMathMLEditor.xml, don't forget to delete the 
cache from browser

regards,

Original comment by ionel.alexandru@gmail.com on 29 Oct 2014 at 3:34

GoogleCodeExporter commented 8 years ago
Thank you for your prompt response. Actually Im using php, and these are my 
trial based on your advice.

---Trial 1, success---

[configMathMLEditor.xml]        
<property 
id="urlGenerateImage">http://localhost/mysite/public/capture/imageCapture.php</p
roperty>

[imageCapture.php]
echo "http://localhost/mysite/public/capture/img/" . $_POST["name"].".".$type;

---Trial 2, failed, same error as before---

[configMathMLEditor.xml]
<property 
id="urlGenerateImage">http://mysite.dev:8080/capture/imageCapture.php</property>

[imageCapture.php]
echo "http://mysite.dev:8080/capture/img/" . $_POST["name"].".".$type;

---discussions---

Note that virtualhost mysite.dev:8080, it is a map for localhost/mysite/public 
(mean that if I go to http://mysite.dev:8080 ,  apache will redirect it to 
http://localhost/mysite/public). And its fail saving image for the virtualhost 
path, with the same debug result that system cant find iframeMathEditor. The 
plugin cant do routing as apache does maybe (but who need routing, since I 
already put full path in the xml) ?

Any other idea ? Maybe I must dig to imageCapture.php/javascript/swf area, or 
anything.

Regards,

Original comment by aries.wa...@gmail.com on 29 Oct 2014 at 4:24

GoogleCodeExporter commented 8 years ago
Forget to mention, I've already had my browser cache cleared.

Regards,

Original comment by aries.wa...@gmail.com on 29 Oct 2014 at 4:36

GoogleCodeExporter commented 8 years ago
hmm, the only change is in configMathMLEditor.xml.
Is like that is working for my online version:
http://www.fmath.info/editor/example.jsp

Could be the flash security protection. 
Flash can't connect on another server than the server from is loaded.
Your site is on http://mysite.dev:8080/ ?

Original comment by ionel.alexandru@gmail.com on 29 Oct 2014 at 5:49

GoogleCodeExporter commented 8 years ago
Maybe its the issue, flash security protection. But yes, my site is always in 
mysite.dev:8080 .

Anyhow, based on your clue that fmath need absolute path, I put ckeditor and 
imageCapture.php in public area (instead of in private folder that was accessed 
via routing and relative path). And also, I change virtualhost to mysite.dev 
(that I must change localhost to local.dev:8080). And now, it works perfectly.

Thank you for your support. Your work of fmath is amazing.

Regards,

Original comment by aries.wa...@gmail.com on 30 Oct 2014 at 6:18

GoogleCodeExporter commented 8 years ago

Original comment by ionel.alexandru@gmail.com on 24 Nov 2014 at 7:37