openlab-at-city-tech / webworkqa

WeBWorK integration for WordPress and BuddyPress
GNU General Public License v2.0
4 stars 2 forks source link

Problem and question fields don't load on mobile #79

Closed bree-z closed 7 years ago

bree-z commented 7 years ago

When I click on Ask for Help on the WW site, it opens the OL-WW site in a new tab, but neither the problem nor the Ask a Question box load. I just see a list of questions in the order they're listed on the OL-WW homepage.

WW URL: http://mathww.citytech.cuny.edu/webwork2/WW-Dev/AddRationalExpressions2/16777216/?user=student1&effectiveUser=student1&key=ro5vPUYzZtjDdhx1WCfoiXtPb9Tb3kVB OLdev URL: http://openlabdev.org/webwork-playground/?post_data_key=webwork_post_data_a7715f2c97c78d77563c7c6c809e66df

I'm on iOS 10.2.1/Chrome

image1

moui72 commented 7 years ago

When I use the OLdev-URL I see the same, but when I use the WW-URL and click "ask for help" it loads the expected page with question fields visible. Android 7 / chrome 55

bree-z commented 7 years ago

I tested this one more time, just in case I was doing something dumb, and got the same result. (Perhaps I'm still doing something dumb, but I'm not sure what that could be!)

WW URL: http://mathww.citytech.cuny.edu/webwork2/WW-Dev/AddRationalExpressions2/16777216/?user=student2&key=yFNELU5n6D2B1Q5Bwp2f2E8N6Y6wqK8N&effectiveUser=student2

OLdev URL: http://openlabdev.org/webwork-playground/?post_data_key=webwork_post_data_13c05ce0a1e46731586343bddffa426c

boonebgorges commented 7 years ago

I'm seeing the same thing on iOS. I think it has to do with security precautions related to our HTTP authentication. I'll disable the auth for a moment and see if that fixes it.

boonebgorges commented 7 years ago

Oof. It seems like the problem is actually more serious, and probably one that already affects the production site.

Something about iOS Safari is causing the URL fragment (the #/chunk/that/looks/like/this) to be lost during the redirect chain that occurs when coming from WeBWorK. Apparently this browser implements fragments differently from others when receiving a 302 Redirect header.

As a workaround, I converted the redirect to JavaScript, so that no true redirect headers are required. It seems to fix the problem for me. @bree-z @moui72 Could I ask you to give a quick test on a couple different platforms, to ensure that the Ask For Help button redirects as you'd expect?

boonebgorges commented 7 years ago

A very quick follow-up that my workaround has no effect if you have to go through the login process after clicking Ask For Help; during the login process, WP sends a 302 Redirect header that breaks the chain. I might be able to come up with another workaround for this, but it's more than I can do at the moment.

bree-z commented 7 years ago

Thanks, Boone. I can confirm that it's working on iOS if I'm already logged into OLdev.

moui72 commented 7 years ago

Still works fine on Android 7/chrome 55 in either login state.

On Thu, Jan 26, 2017, 10:30 PM bree-z notifications@github.com wrote:

Thanks, Boone. I can confirm that it's working on iOS if I'm already logged into OLdev.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/livinglab/webwork-for-wordpress/issues/79#issuecomment-275581540, or mute the thread https://github.com/notifications/unsubscribe-auth/ADtKPC2LPS2QJoIA-iZbgoXM7AaL_xRTks5rWWS5gaJpZM4LvQD0 .

boonebgorges commented 7 years ago

Thank you!

boonebgorges commented 7 years ago

I'm going to handle the iOS login issue in #80.