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

Fengoffice: Update to v3.11.1.2 #5992

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

mreid-tt
Copy link
Contributor

@mreid-tt mreid-tt commented Jan 26, 2024

Description

This PR contains the following:

  1. Upgrade Feng Office to version 3.11.1.2
  2. Modernise package scripts
  3. Add PHP profiles for DSM 6

Fixes #2348
Closes #4230

Checklist

  • Build rule all-supported completed successfully
  • New installation of package completed successfully
  • Package upgrade completed successfully (Manually install the package again)
  • Package functionality was tested
  • Any needed documentation is updated/created

Type of change

  • Package update

@mreid-tt mreid-tt force-pushed the fengoffice-update branch 7 times, most recently from 4146415 to 00bd280 Compare January 27, 2024 04:57
@mreid-tt
Copy link
Contributor Author

mreid-tt commented Jan 27, 2024

hey @hgy59, I was attempting to upgrade this package but ran into some problems with the installer. With the earlier package it seems the original contributor sent some arguments to a supplemental installer which automated the first three steps of the four step wizard.

Running this with it's original setup I got the following in the installer log:

2024/01/26 21:57:21	===> Step postinst. STATUS=INSTALL USER=fengoffice GROUP= SHARE_PATH=
2024/01/26 21:57:21	Begin save_wizard_variables
2024/01/26 21:57:21	End save_wizard_variables
2024/01/26 21:57:21	Begin syno_sync_var_folder
2024/01/26 21:57:21	End syno_sync_var_folder
2024/01/26 21:57:21	Begin service_postinst
2024/01/26 21:57:21	PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_connect() in /volume1/web_packages/fengoffice/public/install/installation/acInstallation.class.php:113
2024/01/26 21:57:21	Stack trace:
2024/01/26 21:57:21	#0 /volume1/web_packages/fengoffice/public/install/installation/steps/FinishStep.class.php(56): acInstallation->execute()
2024/01/26 21:57:21	#1 /volume1/web_packages/fengoffice/public/install/library/classes/ScriptInstaller.class.php(93): FinishStep->execute()
2024/01/26 21:57:21	#2 /volume1/web_packages/fengoffice/public/install/install_helper.php(8): ScriptInstaller->executeStep(4)
2024/01/26 21:57:21	#3 {main}
2024/01/26 21:57:21	  thrown in /volume1/web_packages/fengoffice/public/install/installation/acInstallation.class.php on line 113
2024/01/26 21:57:21	End service_postinst

My assessment of this was that the PHP execution did not include the extensions that would normally be included with the FPM service and these needed to be manually included.

In this state however the wizard was able to be manually run on launch of the web page and if you configured all the required fields the installation would complete. The app seemed to be fully functional (under DSM 7; haven't completed the DSM 6 stuff yet).

I then modified the script to include the PHP extensions. While there were no longer errors in the install log, the service log spat out an HTML page (https://pastebin.com/RNrxGT3u), which contained the error:

Found faulty query: INSERT INTO `fo_members` (`dimension_id`,`object_type_id`, `parent_member_id`, `depth`, `name`, `object_id` ) SELECT (SELECT `id` FROM `fo_dimensions` WHERE `code`='feng_persons'), (SELECT `id` FROM `fo_object_types` WHERE `name`='company'), 0, 1, `o`.`name`, `o`.`id` FROM `fo_objects` `o` INNER JOIN `fo_contacts` `c` ON `c`.`object_id`=`o`.`id` WHERE `c`.`is_company`=1 ON DUPLICATE KEY UPDATE dimension_id=dimension_id
Error while loading inital data for plugin 'core_dimensions'. Field 'description' doesn't have a default value

Now I don't know if this is a warning or an error preventing setup but the webpage does not load after the installation is completed. This is unlike when the automatic setup was not working before. I am not sure what else can be done to resolve this other than requiring the user to just do all the wizard steps. The challenge with that is that the wizard often times out when the database is being setup and only after trying to load the webpage a few times does the interface come up.

EDIT: Okay, I think I've solved it. In reviewing the webpage generated by the manual install most of the parameters were identical with the exception of [database_type]. The original script had mysql whereas the current webpage has mysqli. With this change, the installation seems to have completed successfully. I'll proceed to work on the DSM 6 configs now.

Upon further examination, it seems that the second error encountered during the initial database setup persists across both DSM 6 and 7. However, it is now obscured within the service_postinst execution and can only be seen in the service log. The reported issue of the webpage failing to load after a manual setup appears to be linked to timeouts and caching. Notably, the interface functions properly if one exercises patience or refreshes the page after logging in. This discrepancy in behaviour is absent in the automatic setup, likely because the install helper doesn't support timeouts, waiting until the process concludes. Additionally, since there are no browser queries involved, caching concerns are mitigated.

@mreid-tt
Copy link
Contributor Author

@hgy59, I believe this package update is now complete. Let me know if you have any thoughts from your review.

@mreid-tt mreid-tt changed the title Fengoffice: Update to v3.10.8.3 Fengoffice: Update to v3.10.8.6 Feb 2, 2024
@mreid-tt
Copy link
Contributor Author

mreid-tt commented Feb 2, 2024

hey @moneytoo, as you were the original contributor to this package, I wondered if you had any thoughts on my proposed update?

@mreid-tt mreid-tt changed the title Fengoffice: Update to v3.10.8.6 Fengoffice: Update to v3.10.8.21 Apr 3, 2024
@hgy59
Copy link
Contributor

hgy59 commented Apr 7, 2024

@mreid-tt I will need additional cycles for a deeper review.

But one question already popped up:
We have a default uninstall wizard for all DSM 7 packages, that asks whether to remove all package data.
There are some additional folders that must be removed/cleaned by the uninstaller, when (*) Erase all of the package data files. (Not Recverable), is selected. Otherwise on DSM 7 even the fengoffice database must be kept.

@mreid-tt
Copy link
Contributor Author

mreid-tt commented Apr 7, 2024

We have a default uninstall wizard for all DSM 7 packages, that asks whether to remove all package data.
There are some additional folders that must be removed/cleaned by the uninstaller, when (*) Erase all of the package data files. (Not Recverable), is selected. Otherwise on DSM 7 even the fengoffice database must be kept.

When I was working on ownCloud I opted for the complete removal of the package along with a robust backup mechanism to include the database and the data. Because the data is in the web folder I suspect I'll need to expand the backup function for FengOffice as well to include same.

If I leave the database but the web data gets removed then it doesn't really benefit the user in my opinion. So with a good backup, the default action would be to erase all package data files.

@hgy59
Copy link
Contributor

hgy59 commented Apr 7, 2024

If I leave the database but the web data gets removed then it doesn't really benefit the user in my opinion. So with a good backup, the default action would be to erase all package data files.

✅ Ok, I got it. You have a hidden field in the uninstall wizard file that ensures that wizard_delete_data=true, and the folders I missed are cleanup up...

 	{
		"type": "multiselect",
		"subitems": [{
			"key": "wizard_delete_data",
			"hidden": true,
			"defaultValue": true
		}]
	}

@mreid-tt mreid-tt changed the title Fengoffice: Update to v3.10.8.21 Fengoffice: Update to v3.11.1.2 Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apollolake package for Feng Office requested Feng Office Installer Claims MySQL Root Password is Incorrect
2 participants