BiologicalRecordsCentre / UKBMS-online

Issue tracking for UKBMS online recording site
2 stars 0 forks source link

D8 Saving new site using Drupal 8 form hangs #136

Closed DavidRoy closed 3 years ago

DavidRoy commented 4 years ago

https://test-ukbms8.pantheonsite.io/site-details

Details entered and then press save, popup says that site is being created but then page hangs pic3

Gary-van-Breda commented 4 years ago

I can't reproduce this error - I've tried with admin and masqueraded as DavidRoy. Can you confirm which browser you are using? Can you try again, and if it happens again, Press F12 and check if there are any console errors?

DavidRoy commented 4 years ago

I'm using Chrome. I cleared the cookies. Tried the following.

  1. masqueraded as user = DavidRoyTest
  2. Went to create a new Transect site. https://test-ukbms8.pantheonsite.io/site-details?location_type_id=777
  3. Unable to set site name or grid reference (by clicking on map) pic12

F12 shows a console error of: A cookie associated with a cross-site resource at http://indicia.org.uk/ was set without the SameSite attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.

DavidRoy commented 4 years ago

As admin, the page works fine. Although site did not appear in list of https://test-ukbms8.pantheonsite.io/my-sites

Should a new site be automatically assigned to the user who created it?

Gary-van-Breda commented 4 years ago

For normal users, the site is automatically assigned to the creator. For Admins and branch managers, the assignment is not automatic, and has to be done manually.

DavidRoy commented 4 years ago

Thanks. The remaining issue is setting up a new site for a normal user in that case? @IanMiddlebrook can you test setting up a new site

IanMiddlebrook commented 4 years ago

I've tried to set up a new Site, but it just hangs after I click on Save: image

The first problem I noticed is this instruction: "Use the search box to find a nearby town or village, then drag the map to pan and click on the map to set the centre grid reference of the transect. Alternatively if you know the grid reference you can enter it in the Grid Ref box on the left."

But there is no Search Box.

I'm using Microsoft Edge Version 81.0.416.72 (Official build) (64-bit)

Thanks, Ian

Gary-van-Breda commented 4 years ago

@DavidRoy @IanMiddlebrook I've set the AjaxProxy passthrough permission for all authenticated users (not just admin): could you try again?

The search box issue is due to the fact that the Google Search API keys are tied to the URL - in this case ukbms.org. The pantheon Dev and Test sites use different URL domains - so this will not work until we go live, unless someone (e.g. @BirenRathod) is able to change the current API keys, or add to the list of URLs that this API key applies to.

DavidRoy commented 4 years ago

@IanMiddlebrook can you test this please

IanMiddlebrook commented 4 years ago

Filled in site details, clicked Save. After a few seconds a pop-up box appeared to say that details had been saved, although the darkened screen and rotating circle remained for a few more seconds. Clicked OK, and I was still on the Site Details view (I think the current version sends you straight to the 'Your Route' tab once you save the Site Details?) Went to draw in Section 1 - the map is zoomed in on the central grid ref, so had to zoom out and move around to get to the start of Section 1. The mouse scroller does not zoom the map in or out.

Finished drawing section 1, clicked on Next to draw section 2. The map then immediately zooms back in on the central grid ref again, so I have to zoom out and move the map round to get back to the end of section 1. Obviously this process repeats for every subsequent section. I guess this must be a result of not having an overall map of the route on one screen/tab, but having the individual sections on their own tabs. It certainly makes drawing the route a lot more cumbersome.

At one point I was happy with the route, so clicked on Finish. I got the message "Leave site page? You have requested to leave the site page, but you have carried out some edits which have not been saved yet. Are you sure you wish to continue? You will lose all unsaved changes." So I cancelled that, but the 'Save' button was blanked out - I couldn't click on it. So I clicked on Finish again and went back to My Sites. When I returned to my new site, only 2 of the 9 sections had saved. So I deduce from that you need to click on Save after drawing each section rather than 'Next'? And the reason my 'Save' button was blanked when I tried to leave was because I was looking at one of the 2 sections which had been saved.

Even later, after saving all sections, reviewing the site details and clicking on Finish, I got the same message, but the Save button I could see was blanked out and there was no indication of what details had not been saved and so which screen/tab I would need to pull up in order to save. Perhaps the Save button on Site Details view should at least Save all changes related to that Site?

When drawing a new route, there is no option to either Insert or Remove a Section (as there is on the existing system). When returning to the Site Details page, there was no ability to alter the number of Sections (as there is on the existing system - even for normal Users until they start entering data).

After finally saving all sections, and checking each section had a section length recorded, I returned to My Sites, returned to the Site Details page and the overall length of the transect remained at 0m.

I can't think of any other aspects to test at the moment, but this should be enough to think about for now.

Gary-van-Breda commented 4 years ago

@IanMiddlebrook

New version deployed into Test. Now has:

DavidRoy commented 3 years ago

Closing this. Specific issues can be raised separately