loogart / impact-canada

Canadian Government's Privy Council's Office Impact Canada website.
https://loogart.github.io/impact-canada/
0 stars 0 forks source link

Migrate views / config changes on DEV site to PROD #59

Open habernation opened 5 years ago

habernation commented 5 years ago

A series of updates have been made to the DEV site to help us manage site content. These include:

These are ready to be migrated to the PROD site. As we discussed, content is not to be transferred. We can add the content manually (key dates) once the PROD site has been updated .

Let me know if you have any questions or comments.

djsutter commented 5 years ago

I have updated the production site just now. Seems to have gone well. The only unexpected item was that I had to delete a webform submission before the config would load. This will not be a problem going forward as long as we make all structural changes on the dev site and propagate forward.

habernation commented 5 years ago

H Duncan, I've updated the news content on the PROD site (filling in the URL and parent_challenge field for each) and everything looks great, thanks. The only thing that seems to have gone wrong is the loss of the views I had developed in the Dev site (Challenge Owner Dashboard). It's been deleted from the DEV site entirely and does not appear on the PROD site.

Before I go ahead and rebuild it, can you confirm whether or not the view can be restored and pushed to the PROD site?

habernation commented 5 years ago

If it's complicated to restore- I would ok with rebuilding the view, just let me know if I can do it directly on the PROD or if I should do it on the DEV site.

djsutter commented 5 years ago

Hi Mike, I'm surprised that anything would be missing from the dev site, because my only operation was to export the config. Except that a couple of days ago I deleted a content type as requested - can't remember which one now but Chris said he couldn't delete it - the reason is that there was an node still using it. I'm not sure if this is related. Also I did not reload the dev database recently. So it should be there. I do have nightly backups of the database so can restore one of those on another URL if that would help. Let me know.

djsutter commented 5 years ago

Ok I have restored an old version of the site for you. Go to http://impact-old.qualivera.com Interesting that I had to restore the database from Jan 17 to get your views. By Jan 18 they were gone. So somehow they got deleted on Jan 17. Backups are done nightly at 5min past midnight so the Jan 17 backup contains anything changed on Jan 16. Not sure how you want to proceed from here.

djsutter commented 5 years ago

Also if we can get that view back into impact.qualivera.com then I can do another config export and move it into production.

habernation commented 5 years ago

Hi Duncan, having the backup site is great. I'll use it to help me rebuild the views on the qualivera site (I'll make a few improvements along the way). I'm guessing it got deleted when the Press content type was deleted (it may have still been referencing that content type). I'll let you know when the I have it ready to move into production. Mike

djsutter commented 5 years ago

I bet that's what happened - the timing would be right. Ok well let me know if there's anything else you need. Nice that I've created this system of fully automated nightly backups, it has come in handy on more than one occasion. Also the filesystem is backed up on two servers in my basement, so I can get at files that were deleted as many as 2 days ago (after that, it's gone)

habernation commented 5 years ago

Thanks Duncan. This is actually a good opportunity for me to improve on the design of the view pages I made anyway. I'll probably be done by the end of the day. I'll keep you posted and thanks again for your help.

habernation commented 5 years ago

Hi, I've updated the DEV site with site administration dashboard views so it's ready for migration to PROD.

One thing I can't figure out is how to assign specific shortcut menus to user roles: If possible, I'd like the user role 'Challenge Owners' have the 'Challenge Owner Shortcuts' shortcut menu and the 'default shortcut menu' can be used for "administrators".

Each provides a 'dashboard' link that links to either the admin or the challenge owner dashboard. Let me know if that's possible. Thanks,

Mike

djsutter commented 5 years ago

OK I imported the config from dev into production; your views are there now. I think the menus you're referring to - you've created in global text in the header. The only thing I can think of to control who sees what based on role, is to fix it at the template level. You could use CSS classes, for example, to specify which role should see the item, and the template would render based on the user's actual role. Let me know if you want to pursue that option. I can't think of another way offhand, without getting into the actual Drupal menu structure.

habernation commented 5 years ago

Hi Duncan, everything looks good on the PROD site. As far as the menus, I was referring to the shortcuts tab in the admin navbar, not the buttons I inserted in the view header. I'll look into some options and get back to you. Thanks again, Mike

djsutter commented 5 years ago

Hi Mike, I just read up a bit on these shortcut menus. It seems to me that as an admin, you can assign a specific shortcut set to a user and make it so that they cannot choose which shortcut set they will use. It may not be exactly what you're looking for, but I think it would achieve the same end. It's just that you need to do it per-user and not per-role.

habernation commented 5 years ago

Thanks, I'll look into that- if that's the case, that'll do just fine. Mike

djsutter commented 5 years ago

Can this issue be closed?