packetfence icon indicating copy to clipboard operation
packetfence copied to clipboard

Cannot reopen edited captive portal files in the GUI PF 12.0

Open RHDHV-simon-sutcliffe opened this issue 2 years ago • 6 comments

Describe the bug Editing the default captive portal files within the GUI is allowed but subsequent reopening the edited file shows the original unedited one.

To Reproduce Steps to reproduce the behavior:

  1. Go to A Standard Connection Profile
  2. Click on Files tab and notice that there are no files edited by sliding the Show all files to show modified files only
  3. unclick the slider to show all files.
  4. Click on 'aup_text.html'
  5. Edit the file as required.
  6. Press Save.
  7. Notice the file icon now is dark gray.
  8. Press the "Preview" button at the top.
  9. Navigate to the AUP text.
  10. You will see the updated text displayed.
  11. Click on 'aup_text.html'
  12. Error you see the original text prior to edits.

Screenshots Unedited file

image

Edits made image

Preview image

File displayed as edited image

Reentered editor image

Expected behavior The edited text should be displayed.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Edge Chromium
  • Version: 106

Additional context This happens for all files not just the one example given.

This is a reoccurring bug #6800 and #6840

RHDHV-simon-sutcliffe avatar Oct 11 '22 11:10 RHDHV-simon-sutcliffe

@jrouzierinverse To my Suprise my edited files appeared today when I opened them in the editor so I saved a new edit and again yesterdays file appeared not the newly edited.

Looking at the network traffic it appears that the browser is getting the files from cache not reloading them from PF

image

Hope this helps you with solving the issue.

RHDHV-simon-sutcliffe avatar Oct 13 '22 06:10 RHDHV-simon-sutcliffe

@satkunas can you look into this?

jrouzierinverse avatar Oct 14 '22 11:10 jrouzierinverse

I'm not able to reproduce on Chromium. I have a feeling that Edge has aggressive client-side caching.

I'll append a random query variable to the GET request in order to side-step the client-side cache.

satkunas avatar Oct 14 '22 12:10 satkunas

@satkunas

I see the same behaviour on Chrome here

First Open image

Add "Test" image

Check that is been server in preview image

Reopen the aup image

See the file is from disk image

Chrome version installed. image

Not sure if it is to do with us running in a cluster not a single server. Let me know if there is something else, I need to provide, happy to help get to the bottom of it with you.

RHDHV-simon-sutcliffe avatar Oct 14 '22 13:10 RHDHV-simon-sutcliffe

@RHDHV-simon-sutcliffe I've pushed a fix to maintenance/12.0. It should be available to you after tonights nightly builds. Please re-test to see if this fix works. Otherwise we'll need to dig deeper to ensure there's R/W consistency in a cluster.

satkunas avatar Oct 14 '22 13:10 satkunas

Will do and let you know

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Satkunas @.> Sent: Friday, October 14, 2022 2:22:39 PM To: inverse-inc/packetfence @.> Cc: Simon Sutcliffe @.>; Mention @.> Subject: Re: [inverse-inc/packetfence] Cannot reopen edited captive portal files in the GUI PF 12.0 (Issue #7265)

This message was sent from an e-mail domain unknown to Royal HaskoningDHV. Please be cautious.

Reopened #7265https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Finverse-inc%2Fpacketfence%2Fissues%2F7265&data=05%7C01%7Csimon.sutcliffe%40rhdhv.com%7C9d18fb750ae2444d4a7708daade72b3d%7C15f996bfaad1451c8d179b95d025eafc%7C0%7C0%7C638013505627629140%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=q5WwySTqxaAJ9dpC3hKzFsYV2atnI7eyBz3kvkUdPao%3D&reserved=0.

— Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Finverse-inc%2Fpacketfence%2Fissues%2F7265%23event-7590365255&data=05%7C01%7Csimon.sutcliffe%40rhdhv.com%7C9d18fb750ae2444d4a7708daade72b3d%7C15f996bfaad1451c8d179b95d025eafc%7C0%7C0%7C638013505627629140%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Dfh0rvDxxGzKcjPrjLQLdjAUD4tsGibWVIfgNwuoCNM%3D&reserved=0, or unsubscribehttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAWZOPURB6552VPEUQOVY4M3WDFNB7ANCNFSM6AAAAAARCFZZFQ&data=05%7C01%7Csimon.sutcliffe%40rhdhv.com%7C9d18fb750ae2444d4a7708daade72b3d%7C15f996bfaad1451c8d179b95d025eafc%7C0%7C0%7C638013505627785774%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=mj1l6b6UnEir1srKsL%2Fxsp6thNTIpFqnELAM6Z7gzsE%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

This email and any attachments are intended solely for the use of the addressee(s); disclosure or copying by others than the intended person(s) is strictly prohibited. If you have received this email in error, please treat this email as confidential, notify the sender and delete all copies of the email immediately

RHDHV-simon-sutcliffe avatar Oct 14 '22 13:10 RHDHV-simon-sutcliffe

@satkunas Yep this appears to be working as designed now. I did not want to say before giving it some testing and time.

RHDHV-simon-sutcliffe avatar Oct 31 '22 15:10 RHDHV-simon-sutcliffe