#15859 closed bug (fixed)
"OK" button in userguide tool's blockediting window doesn't work
Reported by: | humdinger | Owned by: | pulkomandy |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Website/Userguide Translator | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
This is hrev54019.
When you do a "block-edit" of a paragraph at the user guide tool, you cannot submit the changes by clicking the "OK" button. This is in the script console:
Attachments (1)
Change History (10)
by , 5 years ago
Attachment: | OK-button.png added |
---|
comment:1 by , 5 years ago
comment:2 by , 5 years ago
I've modified the Userguide Translator to use relative URLs. But this should stay open until we've validated that we are doing CORS validation correctly; at least Firefox worked on the old version before.
comment:3 by , 5 years ago
Ah, I see that the Userguide Translator is actually using Synchronous XHRs. That may be the problem here; I think WebKit required special support for those and Otter/WebPositive may not bother to implement it as they are deprecated. I'll work on refactoring the Translator to not require them and see if that fixes it.
comment:4 by , 5 years ago
The problem was indeed caused by Sync XHRs. I've refactored the page to use Async XHRs and now it works in Web+ (however, first click of OK triggers #15625.)
comment:5 by , 5 years ago
A step forward then, thank you. I still see the same error in the script console though. Changes still are not sent.
Otter still doesn't work with the site: text fields for original and translation in the pop-up window (which opens as a new tab) are still empty.
comment:9 by , 5 years ago
Component: | Applications/WebPositive → Website/Userguide Translator |
---|---|
Milestone: | Unscheduled |
Update component and remove milestone
Could it be that the userguide translator uses links with the full URL, when they should use something relative at least in XMLHttpRequest?
If I understand things correctly that URL is set in https://github.com/haiku/userguide-translator/blob/da9b3e150455829ee215dc05a70b6ee62b8f3fbb/userguide/inc/config-example.php and then used everywhere.
In particular in the block edit tool: https://github.com/haiku/userguide-translator/blob/da9b3e150455829ee215dc05a70b6ee62b8f3fbb/userguide/shared/block_edit_tool.js
Where I think we should use just /userguide/block_edit.php or even just "block_edit.php" since we're already in the right place.
But it's strange that we get this error, even with an absolute URL, the browser should notice that it matches the current location, still.