ansibleguy76 / ansibleforms

A webapplication to create pretty advanced forms to run ansible playbooks or awx templates.
https://ansibleforms.com/
GNU General Public License v3.0
66 stars 10 forks source link

Ansible form not rendering form field on navigation #146

Closed checkifexist closed 7 months ago

checkifexist commented 7 months ago

Describe the bug I have 2 forms ->

  1. Form1 -> have 1 field and run button
  2. Form2 -> have 1 field and run button

I have added a navigation from one form to another in the help section (since it supports markdown). But when i navigate from one form to another from this navbar the another form fields are not rendered. i.e if I am on form1 and click the link of form2 in the help section -> the url changes and form2 opens, but the fields that were in the form2 are not rendered and only run button is shown. If i reload the form using Reload form of each form then it correctly render.

To Reproduce Steps to reproduce the behavior:

  1. Create 2 forms with some fields
  2. Add the link of form2 on help section of form1 using markdown
  3. Open form1 and click on the link of form2

Expected behavior On clicking link of form2 from navbar created on form1, it should correctly open form2 with all fields

Screenshots if i navigate to form 2 it shows image

after clicking reload this form it shows
image

Version ansibleforms v4.0.19

Deployment Deployed ansibleforms with :

What is cause of this, Is there a way of fixing this?

checkifexist commented 7 months ago

Also the logs of form1 stays there when we move to form2 from the link that I created

checkifexist commented 7 months ago

One temporary solution I am doing is to automatically reload the form for the first time we visit it using javascript. Although its working but still this bug require fix.

ansibleguy76 commented 7 months ago

Fixed in 5.0.1, not that this is inherent to vue web apps. So I had to make a work-around and you will have make the link to /#/form-reload?form=....

This will direct and force reload to /form

ansibleguy76 commented 7 months ago

building 5.0.1 beta now

ansibleguy76 commented 7 months ago

docker compose did not need adaption for this fix.

checkifexist commented 7 months ago

Okay thanks, is the build for v5.0.1 done, are you planning to push it anytime soon?

ansibleguy76 commented 7 months ago

it is in beta, adapt your docker compose file to ansibleguy/ansibleforms:beta

docker pull ansibleguy/ansibleforms:beta

docker-compose down docker-compose up -d

ctrlf5 to refresh client cache

checkifexist commented 7 months ago

Hi, Thankyou for the fix, I tried this beta, although its working fine with links, but sometimes when i open links with /#/form-reload/?form=name, it is not opening name form and instead redirecting to /#/ page, Specially when opening the link to new tab. To reproduce, open the nav link of form2 from form1 in new tab using ctrl+clicking the link that we wrote in help menu. or below image

Can you check and tell a possible way to stop this, thx