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

Prepopulate on branch develop 1.8 #1537

Open
andrea-favarin opened this issue Feb 26, 2024 · 8 comments
Open

Prepopulate on branch develop 1.8 #1537

andrea-favarin opened this issue Feb 26, 2024 · 8 comments

Comments

@andrea-favarin
Copy link

In my test only addIfEmpty mode works, while overwrite does not cover the field. The issue was also confirmed by Monica with her tests.
When I launch caUtils I get this:

[root@dev-wf2-cabe bin]# ./caUtils apply-prepopulate-rules
PHP Warning: Module 'json' already loaded in Unknown on line 0
CollectiveAccess 1.8 (189/GIT) Utilities
(c) 2013-2022 Whirl-i-Gig

Consiglio regionale del Piemonte 0.0% 1/11006 ETC: < 1 sec. Elapsed: < 1 sec [> ]PHP Fatal error: Uncaught Error: Cannot pass parameter 1 by reference in /data/www/html/cola/app/plugins/prepopulate/lib/applyPrepopulateRulesTool.php:117
Stack trace:
#0 /data/www/html/cola/app/lib/Utils/BaseApplicationTool.php(173): applyPrepopulateRulesTool->commandApply_Prepopulate_Rules()
#1 /data/www/html/cola/support/bin/caUtils(165): BaseApplicationTool->run()
#2 {main}
thrown in /data/www/html/cola/app/plugins/prepopulate/lib/applyPrepopulateRulesTool.php on line 117
[root@dev-wf2-cabe bin]#

https://support.collectiveaccess.org/d/301591-prepopulate-on-branch-develop-18/10

@collectiveaccess
Copy link
Owner

Please try running this with current code. Judging by the copyright date and database revision you are running an old version of the branch.

@andrea-favarin
Copy link
Author

Into the branch "develop" the copyright date (2013-2022) and database revision (189) are the same:

image

@collectiveaccess
Copy link
Owner

Please use dev/php8

@andrea-favarin
Copy link
Author

The version dev/php8 also runs on php 7.2?

@collectiveaccess
Copy link
Owner

It'll run on PHP 7.4. You should not be using 7.2 at this point.

@Monica-Wood
Copy link

Hi Seth. I am on dev/php8 and I am finding that overwrite isn't always working on prepopulate either.

overwrite DOES work if using target and source (for containers)
overwrite DOES NOT work if using target and template

I also get the error with apply-prepopulate-rules, but this happens if there is mode set to overwrite or not.

root@ca-dev:/var/www/providence# support/bin/caUtils apply-prepopulate-rules
CollectiveAccess 2.0 (195/GIT) Utilities
(c) 2013-2023 Whirl-i-Gig

Processing ca_storage_locations                                                                                                                              0.0% 1/31463 ETC: < 1 sec. Elapsed: < 1 sec [>                              ]PHP Fatal error:  Uncaught Error: prepopulatePlugin::prepopulateFields(): Argument #1 ($params) cannot be passed by reference in /var/www/providence/app/plugins/prepopulate/lib/applyPrepopulateRulesTool.php:117
Stack trace:
#0 /var/www/providence/app/lib/Utils/BaseApplicationTool.php(173): applyPrepopulateRulesTool->commandApply_Prepopulate_Rules()
#1 /var/www/providence/support/bin/caUtils(165): BaseApplicationTool->run()
#2 {main}
  thrown in /var/www/providence/app/plugins/prepopulate/lib/applyPrepopulateRulesTool.php on line 117

Fatal error: Uncaught Error: prepopulatePlugin::prepopulateFields(): Argument #1 ($params) cannot be passed by reference in /var/www/providence/app/plugins/prepopulate/lib/applyPrepopulateRulesTool.php:117
Stack trace:
#0 /var/www/providence/app/lib/Utils/BaseApplicationTool.php(173): applyPrepopulateRulesTool->commandApply_Prepopulate_Rules()
#1 /var/www/providence/support/bin/caUtils(165): BaseApplicationTool->run()
#2 {main}
  thrown in /var/www/providence/app/plugins/prepopulate/lib/applyPrepopulateRulesTool.php on line 117

@collectiveaccess
Copy link
Owner

Please send me your prepopulate config

@Monica-Wood
Copy link

@collectiveaccess I have emailed you my configuration. I don't need the overwrite at this time, but I was using this to test things in response to @andrea-favarin post on the forum. https://support.collectiveaccess.org/d/301591-prepopulate-on-branch-develop-18/10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants