Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect display of some tickets via form. #2568

Closed
eleducq opened this issue Feb 1, 2022 · 48 comments · Fixed by #2571
Closed

Incorrect display of some tickets via form. #2568

eleducq opened this issue Feb 1, 2022 · 48 comments · Fixed by #2571
Assignees

Comments

@eleducq
Copy link

eleducq commented Feb 1, 2022

Currently under GLPI 10.0.0 with the version of formcreator Alpha.3. Some tickets appear this way when you open them, although the preview in the list is correct :

image
image

While some other tickets are displayed correctly either in preview or when opening the ticket.
In addition, when creating a new ticket, the display error also appears.

@btry
Copy link
Collaborator

btry commented Feb 1, 2022

Duplicate #2543 #2521

@btry btry added the duplicate label Feb 1, 2022
@btry
Copy link
Collaborator

btry commented Feb 1, 2022

The ticket has been created 2 weeks ago. I guess Formcreator Alpha.2 was running at this time ?

@btry btry self-assigned this Feb 1, 2022
@eleducq
Copy link
Author

eleducq commented Feb 1, 2022

No, I switched to a dev version only last week, and I already observed this problem when I switched to V10 of GLPI with Alpha.2 as Alpha.3

@eleducq
Copy link
Author

eleducq commented Feb 2, 2022

Duplicate #2543 #2521

Have you already tested ticket #2543 on the latest version Alpha.3 ?

@btry
Copy link
Collaborator

btry commented Feb 2, 2022

I create tickets nearly every day, but I did not saw this problem. Very likely because i did not fill a form containing a text area question. This is probably this type of question which triggers the bug.

Now I need to allocate some time to validate this assumption.

@eleducq
Copy link
Author

eleducq commented Feb 2, 2022

I will test this solution directly to see if it can fix the problem under Alpha.3

@eleducq
Copy link
Author

eleducq commented Feb 2, 2022

#2543
Unfortunately does not correct the problem of displaying data in html

@btry
Copy link
Collaborator

btry commented Feb 2, 2022

Ok, I did a try with a textarea. I reproduce. When a form does not contains such question the ticket is properly generated.

The problems seems to be related to the text returned by the rich text area. symbols < and > used to mark HTML tags are escaped in the form < and > instead of < and >.

If I fix them, the ticket is correct. Remains to find where the bad conversion occurs.

btry added a commit to btry/formcreator that referenced this issue Feb 2, 2022
@btry
Copy link
Collaborator

btry commented Feb 2, 2022

Please try the above fix and feedback.

@eleducq
Copy link
Author

eleducq commented Feb 2, 2022

I've just tested this patch but it doesn't seem to fix the display of existing tickets as well as new tickets

@btry
Copy link
Collaborator

btry commented Feb 2, 2022

The patch shall fix the generation of new tickets, not those already existing. On my side, it seems to work as expected.

before

image

after

image

Maybe there is something else in your questions which triggers the bug. Please export your form (verify that you don't expose sensitive data), and upload it here.

You may also try a simple form with a textarea question, to check whtout and with the patch if you get the same results as above.

@eleducq
Copy link
Author

eleducq commented Feb 3, 2022

This is one of the most enhanced forms I currently use as it has an html table as well as enhanced text boxes.

btry added a commit to btry/formcreator that referenced this issue Feb 3, 2022
@btry
Copy link
Collaborator

btry commented Feb 3, 2022

Hi

I cannot use this export. You must use the export feature of Formcreator, generating a .json file.

Open the list of forms, select your form, and open massive actions. Choose "Export"

@eleducq
Copy link
Author

eleducq commented Feb 3, 2022

Sorry my bad.
export_formcreator_20220203_0901.zip

@btry
Copy link
Collaborator

btry commented Feb 4, 2022

Hi

The fix is updated, I got one satisfying fedback. Could you cancel the patch, re download it and try again ?

@eleducq
Copy link
Author

eleducq commented Feb 4, 2022

No worries, I'll try this in the morning and get back to you as soon as possible, thanks again

@eleducq
Copy link
Author

eleducq commented Feb 4, 2022

Thanks, everything looks good!

@eleducq
Copy link
Author

eleducq commented Feb 4, 2022

I may be going too fast, but I don't understand why some of my tickets don't display correctly, even though they don't seem to be any different from others that work perfectly.

@btry
Copy link
Collaborator

btry commented Feb 4, 2022

Hi

So using the same form you have tickets properly rendered and tickets with the bug ? Are you sure that all tickets are generated with the latest version of the fix ?

@eleducq
Copy link
Author

eleducq commented Feb 4, 2022

I am doing a complete reinstallation this afternoon, I will come back to you after that

@triplility
Copy link

@btry Hi, may I ask how to upgrade from alpha2 to alpha3?

@btry
Copy link
Collaborator

btry commented Feb 7, 2022

Hi

use the CLI tool of glpi

bin/console glpi:plugin:install formcreator -f -p force-upgrade -u glpi

@triplility
Copy link

Copy the new version directly under the plugins folder, overwrite the old folder, and execute this command, is it right?

@btry
Copy link
Collaborator

btry commented Feb 7, 2022

Copy the new version directly under the plugins folder, overwrite the old folder

no : move the old folder out of GLPI, then copy the new version. Never overwrite a plugin with a new version to upgrade. If a file existed and does not exists anymore this fille will remain, and generaly speaking the presence of an extrafile is unpredictable. It depends on the design of its logic of the plugin.

@triplility
Copy link

done, but it's the same as before.

@btry
Copy link
Collaborator

btry commented Feb 7, 2022

After the installation of Alpha.3 you need to apply this fix :
#2571

I have a positive feedback, but I wish to have some more.

@triplility
Copy link

ok, I miss the fix, let me do it tomorrow, thanks :)

@triplility
Copy link

After the installation of Alpha.3 you need to apply this fix : #2571

I have a positive feedback, but I wish to have some more.

But it doesn't look like it's just happening in taxtarea

@btry
Copy link
Collaborator

btry commented Feb 7, 2022

Then tell the other impacted types, please, and I'll investigate.

@eleducq
Copy link
Author

eleducq commented Feb 7, 2022

After a clean reinstallation of GLPI 10, as well as the plugin, it seems to work well on my side.

@btry
Copy link
Collaborator

btry commented Feb 7, 2022

ok, I guess you tested some tickets, applied the patch and checkd if those tickets are fixed. The fix solved the problems for tickets created when the fix is applied. older tickets are not fixed (it is too late for them)

@eleducq
Copy link
Author

eleducq commented Feb 7, 2022

For the old tickets, some have been corrected, others not, it depends.

@btry
Copy link
Collaborator

btry commented Feb 7, 2022

No old ticket has been corrected : the fix does nothing with them (it would be required to update rows in the DB)

@triplility
Copy link

Then tell the other impacted types, please, and I'll investigate.

image

I try to re install glpi10 from beta to RC1, and re-install formcreator to alpha 3 and update fix, but it look like still not work for me.

@btry
Copy link
Collaborator

btry commented Feb 8, 2022

Export the form to get its JSON representation, and send it here. I'll try to reproduce with it.

@triplility
Copy link

@husisusi
Copy link

I can confirm this issue using git version.

@btry
Copy link
Collaborator

btry commented Feb 14, 2022

Hi

I did some tests with a checkboxes question and I reproduce.

@btry
Copy link
Collaborator

btry commented Feb 14, 2022

Please test the above fix and feedback. It operates on checkboxes, multiselect and actors

@husisusi
Copy link

Please test the above fix and feedback. It operates on checkboxes, multiselect and actors

It's much better! But still has a issue:
grafik

@triplility
Copy link

html rendering in targets #2591

yes, It's much better! just as same as above. some type can see

@btry
Copy link
Collaborator

btry commented Feb 15, 2022

Hi

@husisusi @triplility do you both use the release 2.13.0-alpha.3 or a more recent revision ? In my bugfix research I don't have the HTML tag br in the ticket (latest revision). I'll have a look on the tagged revision to see if I can reproduce.

@husisusi
Copy link

Hi

@husisusi @triplility do you both use the release 2.13.0-alpha.3 or a more recent revision ? In my bugfix research I don't have the HTML tag br in the ticket (latest revision). I'll have a look on the tagged revision to see if I can reproduce.

It was git master version. With 2.13.0-alpha.3 and #2591 no issue. Thank you @btry !!

@btry
Copy link
Collaborator

btry commented Feb 15, 2022

Hi I updated the PR. Please remove the previous fix, download the re-apply it, then feedback.

@husisusi
Copy link

Hi I updated the PR. Please remove the previous fix, download the re-apply it, then feedback.

Done, it works as expected.

@btry
Copy link
Collaborator

btry commented Feb 16, 2022

Hi

@triplility can you feedback please ?

@triplility
Copy link

Hi

@triplility can you feedback please ?

Great! it's work fine! thanks so much!

@btry
Copy link
Collaborator

btry commented Feb 16, 2022

Hi

Thank you for your feedback; I close this issue.

@btry btry closed this as completed Feb 16, 2022
btry added a commit that referenced this issue Feb 17, 2022
only when textarea field is rendered in the target

fix #2568 #2543 #2521
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants