Picture of Chris Gillison
URL location not updating
by Chris Gillison - Wednesday, 15 March 2017, 6:59 PM
 

Hi all,

I'm having real problems with the URL location not updating using the latest framework and the current adapt-pageIncompletePrompt extension. The extension used to work great.

Starting with a basic created course, if I click on 'Presentation Components', the page loads and the URL changes, but if I then click the 'back' button in the navigation bar and confirm the 'pageIncomplete' prompt, the menu screen loads but the URL stays at co-05. If I then refresh the browser I'm taken back to 'Presentation Components'.

Needless to say this is creating havoc with the navigation extensions I'm using (drawerPageNavigation & quickNav), and although I've not tried it yet, it seems likely it would do the same with LMS bookmarking.

It looks like pageIncompletePrompt uses router.js in the core folder to handle the navigation but that's a little too far out of my depth to start messing with.

Any help would be very gratefully received.

Chris

Picture of Matt Leathes
Re: URL location not updating
by Matt Leathes - Thursday, 16 March 2017, 5:07 PM
 

yes, I see what you mean... investigating...

Picture of Matt Leathes
Re: URL location not updating
by Matt Leathes - Friday, 17 March 2017, 5:32 PM
 

FYI: https://github.com/cgkineo/adapt-pageIncompletePrompt/issues/12

Not sure that this ever worked properly... the PIP extension hasn't changed in more than a year so it's hard to see how that could have broken anything. There's been some recent updates (in the past few days) to router.js which did cause an issue with PIP but even with those changes rolled back (or fixed) the problem still occurs.

None of this should affect LMS bookmarking btw

Picture of Chris Gillison
Re: URL location not updating
by Chris Gillison - Friday, 17 March 2017, 6:51 PM
 

Thanks for looking into this Matt.

If it helps, I have an old test project where it's working fine, dated from early October last year.

I created a new course and started overwriting its core files with old ones to see if I could whittle it down to where the problem was occurring by process of elimination.

The following new core files needed to be overwritten with old ones before things worked (although doubtless some of these are here because they're interdependent, not causing the issue themselves)...

accessibility.js, app.js, offlineStorage.js, router.js, startController.js, questionModel.js, buttonsView.js, questionView.js

Chris

Picture of Matt Leathes
Re: URL location not updating
by Matt Leathes - Friday, 17 March 2017, 7:52 PM
 

Hey, no problem at all - we all benefit from finding and fixing these things, that's the joy of open source!

router.js would be the obvious candidate for breaking it... would you mind attaching your old copy of that, app.js and startController.js so I can have a quick look at them?

Picture of Chris Gillison
Re: URL location not updating
by Chris Gillison - Friday, 17 March 2017, 8:18 PM
 

Sure. Here you go...

I'm using subversion to overwrite/restore so I think the list is pretty accurate (I have no idea how people did things before subversion - just to be able to overwrite and restore things in a snap to see what's changed without having to open/compare everything or making a backup of originals etc etc etc!)

Picture of Matt Leathes
Re: URL location not updating
by Matt Leathes - Monday, 20 March 2017, 12:01 PM
 

sorry could you include a copy of router.js as well? that's what I really need to see but I didn't make that very clear, reading back!

Picture of Chris Gillison
Re: URL location not updating
by Chris Gillison - Monday, 20 March 2017, 12:51 PM
 

Ah yes - now I see the comma after "that". Sorry. File attached.

Picture of Chris Gillison
Re: URL location not updating
by Chris Gillison - Friday, 17 March 2017, 7:34 PM
 

...and thanks for submitting the tweak to router.js. Will be interested to see if that is a NO NO or workable.

Picture of Jimmy Jones
Re: URL location not updating
by Jimmy Jones - Thursday, 7 September 2017, 7:31 AM
 

router.js would help.

For any problems related to router, check here: 192.168.0.1