systopia / de.systopia.civioffice

Use docx files as templates to create personalized documents in various CiviCRM workflows
Other
2 stars 5 forks source link

Fix redirect htmlized and failing to load on WordPress #68

Open mattwire opened 3 months ago

mattwire commented 3 months ago

I only tested this on WordPress but the multiple document download was failing.

The queue was running but then the redirect went to the homepage instead of the download page.

Generated URL: https://[example.org]/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcivioffice%2Fdownload&id=replacedwithhiddenid&instant_download=0&return_url=replacedwithhiddenencodedreturnurl

Required URL: https://[example.org]/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcivioffice%2Fdownload&id=replacedwithhiddenid&instant_download=0&return_url=replacedwithhiddenencodedreturnurl

vurt2 commented 3 months ago

I just ran into the same problem with wordpress. This fixes it.

Before I encountered this pr I also patched the file in my systems. There is another occurrence of the RM_Utils_System::url() function in runViaWebUrl() in the same file which should also be fixed in my opinion. There is an "&" in the query parameter which should not be htmlizied.

best Martin

mattwire commented 1 month ago

@vurt2 Updated patch to update both URLs. @peth-systopia download does not work properly without this patch on WordPress

peth-systopia commented 3 weeks ago

@mattwire Have you tested this on Drupal as well?