简体   繁体   English

显然是非感性404跨浏览器错误

[英]Apparently Non-Sense 404 Cross-Browser Error

I am encountering an all-browser bug via the WP-FB-AutoConnect wordpress plugin. 我正在通过WP-FB-AutoConnect wordpress插件遇到一个浏览器错误。 After successful login (confirmed via logs and session testing) the callback_function.submit() to the form is resulting in a 404 error. 成功登录后(通过日志和会话测试确认),表单的callback_function.submit()导致404错误。 However, when I refresh the page, the file does in fact exist. 但是,当我刷新页面时,该文件实际上确实存在。 It is as if there is some sort of encoding error in the action attribute of the element, however, I have tried all obvious fixes, from urlencode() to htmlentities(). 好像该元素的action属性中存在某种编码错误,但是,我尝试了所有明显的修复,从urlencode()到htmlentities()。

Since I cannot provide an example because it is in a protected development environment, please allow me to describe how the plugin works. 由于我无法提供示例,因为它处于受保护的开发环境中,请允许我描述该插件的工作方式。 I have a strong feeling this has nothing to do with the particular plugin, and instead is a result of something I am simply not familiar with. 我有一种强烈的感觉,这与特定的插件无关,而是我根本不熟悉的结果。

  1. User clicks Facebook Login. 用户单击Facebook登录。
  2. Facebook login prompt appears as expected, and user clicks 'allow' 出现Facebook登录提示,并且用户单击“允许”
  3. Session is started. 会话开始。 Confirmed in logs, and confirmed by visiting website to check session. 在日志中确认,并通过访问网站确认会话进行确认。
  4. However, when the form is submitted via callback [document.callback_function.submit() contained in function provided to Facebook API] the resulting page is a 'Link appears to be broken [chrome]'. 但是,当通过回调[提交给Facebook API的函数中包含的document.callback_function.submit()]提交表单时,结果页面为“链接似乎已损坏[chrome]”。
  5. The file exists. 该文件存在。 This is confirmed by refreshing the page that the browser is saying does not exist. 通过刷新浏览器说不存在的页面来确认这一点。

Some notes: 一些注意事项:

  1. Permissions are correct. 权限是正确的。 The page loads on refresh. 页面在刷新时加载。 The file exists. 该文件存在。
  2. This bug appears in Webkit and Moz, I didn't bother with IE because that's an entirely different set of headaches. 这个错误出现在Webkit和Moz中,我没有理会IE,因为那是完全不同的麻烦。
  3. The link is correct and none of the characters in the URL appear to be encoded incorrectly. 链接正确,URL中的所有字符似乎均未正确编码。
  4. Again, zero errors in any logs. 同样,任何日志中的错误均为零。

Please note: I am having a hard time describing this bug because it's very inconspicuous. 请注意:我很难描述此错误,因为它不显眼。 I have never encountered anything like this in my 13 years of web development. 在我从事Web开发的13年中,我从未遇到过类似的事情。

It is my hope that there is someone out there who has experienced something like this and has any input on the matter. 我希望有一个经历过这样的事情并且对此事有任何投入的人。 I am really hoping that this is just a moment of humility for me. 我真的希望这只是我的谦卑时刻。 After hours and hours of debugging an invisible bug, and resisting coming here due to my lack of ability to describe the issue, I have no other choice. 经过数小时的调试隐性错误并由于缺乏描述问题的能力而拒绝来到这里,我别无选择。 I cannot find any occurrence of this bug, either Facebook Login specific bugs, or generally within Javascript, browser issues or server-side issues through such avenues as Google or Stack Overflow. 我找不到任何此类错误,无论是Facebook登录特定的错误,还是在Javascript,浏览器问题或通过Google或Stack Overflow之类的服务器端问题中都找不到的错误。

Double check the script, from the error your browser sent, it seems as if there's an error in the script itself, which causes it to fail. 仔细检查脚本,从浏览器发送的错误中看,脚本本身似乎有错误,这会导致脚本失败。 PHP cannot parse errors if they happen before the site is done loading. 如果无法在网站加载完成之前发生错误,PHP将无法解析错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM