WordPress issueshttps://lab.civicrm.org/dev/wordpress/-/issues2020-07-18T21:57:10Zhttps://lab.civicrm.org/dev/wordpress/-/issues/65Prevent plugin from being auto-updated in WordPress 5.52020-07-18T21:57:10ZhaystackPrevent plugin from being auto-updated in WordPress 5.5CiviCRM cannot be updated via the WordPress auto-updater, so we should disable this.
Details of the new functionality here:
https://make.wordpress.org/core/2020/07/15/controlling-plugin-and-theme-auto-updates-ui-in-wordpress-5-5/
PR h...CiviCRM cannot be updated via the WordPress auto-updater, so we should disable this.
Details of the new functionality here:
https://make.wordpress.org/core/2020/07/15/controlling-plugin-and-theme-auto-updates-ui-in-wordpress-5-5/
PR here: https://github.com/civicrm/civicrm-wordpress/pull/2115.28.0haystackhaystackhttps://lab.civicrm.org/dev/wordpress/-/issues/62Contact image is broken2021-01-08T12:58:23ZandyburnsContact image is brokenI have reproduced on WP at https://demo.tadpole.cc/ and my install versions 5.26.2. It works on Drupal.
![image](/uploads/d0467024562f844eed2c3f63e0c0c9b1/image.png)
Reproduce:
1. Go to a contact summary screen > edit > upload contact ...I have reproduced on WP at https://demo.tadpole.cc/ and my install versions 5.26.2. It works on Drupal.
![image](/uploads/d0467024562f844eed2c3f63e0c0c9b1/image.png)
Reproduce:
1. Go to a contact summary screen > edit > upload contact image.
1. You'll see the contact image is broken.
1. If you try and navigate to the link (open in new window) it gives the WP error screen.
Link looks like: https://example.org/civicrm/?page=CiviCRM&q=civicrm%2Ffile&reset=1&filename=andy_2018_150x150_20b7648df6da2e1b694b25e5398ee2c7.jpg&mime-type=image/jpeg
Clean URL's are enabled. Note it is using ?page=CiviCRM not ?page=civiwp. The image is being loaded in the /wp-content/uploads/civicrm/custom directory. Images still show on a public profile directory.
WP error log is:
```
Warning: file_get_contents(/wp-content/plugins/civicrm/civicrm/vendor/adrienrn/php-mimetyper/node_modules/mime-db/db.json): failed to open stream: No such file or directory in /wp-content/plugins/civicrm/civicrm/vendor/adrienrn/php-mimetyper/src/Repository/MimeDbRepository.php on line 36
Warning: array_values() expects parameter 1 to be array, null given in /wp-content/plugins/civicrm/civicrm/vendor/adrienrn/php-mimetyper/src/Repository/MimeDbRepository.php on line 49
Warning: array_map(): Argument #2 should be an array in /wp-content/plugins/civicrm/civicrm/vendor/adrienrn/php-mimetyper/src/Repository/MimeDbRepository.php on line 49
Warning: array_keys() expects parameter 1 to be array, null given in /wp-content/plugins/civicrm/civicrm/vendor/adrienrn/php-mimetyper/src/Repository/MimeDbRepository.php on line 52
Warning: array_combine() expects parameter 1 to be array, null given in /wp-content/plugins/civicrm/civicrm/vendor/adrienrn/php-mimetyper/src/Repository/MimeDbRepository.php on line 52
Fatal error: Uncaught TypeError: Argument 1 passed to MimeTyper\Repository\AbstractRepository::setFromMap() must be of the type array, null given, called in /wp-content/plugins/civicrm/civicrm/vendor/adrienrn/php-mimetyper/src/Repository/MimeDbRepository.php on line 52 and defined in /wp-content/plugins/civicrm/civicrm/vendor/adrienrn/php-mimetyper/src/Repository/AbstractRepository.php:18 Stack trace: #0 /wp-content/plugins/civicrm/civicrm/vendor/adrienrn/php-mimetyper/src/Repository/MimeDbRepository.php(52): MimeTyper\Repository\AbstractRepository->setFromMap(NULL) #1 /wp-content/plugins/civicrm/civicrm/vendor/dflydev/apache-mime-types/src/Dflydev/ApacheMimeTypes/AbstractRepository.php(31): MimeTyper\Repository\MimeDbRepository->internalInit() #2 /wp-content/plugins/civicrm/civicrm/vendor/dflydev/apache-mime-types/src/Dflydev/ApacheMimeTypes/AbstractRepository.php(68): Dflydev\ApacheMimeTypes\AbstractRepository->init() #3 /wp-content/plug in /wp-content/plugins/civicrm/civicrm/vendor/adrienrn/php-mimetyper/src/Repository/AbstractRepository.php on line 18
```5.28.0https://lab.civicrm.org/dev/wordpress/-/issues/61undefined offset bug in BAO/FinancialAccount.php2020-07-05T22:25:14Zrgrosundefined offset bug in BAO/FinancialAccount.phpwhile dealing with a white screen, I found a suspicious message in php_errorlog. In debugging that, I think I hit a bug.
- civicrm 5.26.2
- wordpress
In the logging, I see this line:
`[22-Jun-2020 16:58:39 Europe/Amsterdam] PHP Notic...while dealing with a white screen, I found a suspicious message in php_errorlog. In debugging that, I think I hit a bug.
- civicrm 5.26.2
- wordpress
In the logging, I see this line:
`[22-Jun-2020 16:58:39 Europe/Amsterdam] PHP Notice: Undefined offset: 0 in /home/user/public_html/civicrm-nw/wp-content/plugins/civicrm/civicrm/CRM/Financial/BAO/FinancialAccount.php on line 255`
This notice is triggered by doing a payment after registering for a paid event.
The line that is mentioned in the notice is in function *getFinancialAccountForFinancialTypeByRelationship*; I put in some print statements and found out that it gets value 'Income Account is' in parameter *$relationshipType*. The line of the message uses the hard coded value instead:
`$incomeAccountRelationshipID = array_search('Income Account is', $accountRelationships);`
which is suspicious in itself. But the array $accountRelationships does not contain that value, which causes the message. The array appears to contain the dutch equivalents of the relationships:
```
LOC103 Array
(
[1] => Inkomsten rekening is
[2] => Credit/Contra Revenue Account is
....more
}
```
I am no php programmer, so I fixed it for my site by changing the hard code value to 'Inkomsten rekening is', making the message disappear. I think the code should be changed to somethink like
`$incomeAccountRelationshipID = array_search(translation_of ($relationshipType), $accountRelationships);`5.28.0