Closed (fixed)
Project:
AddThis
Version:
7.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Sep 2014 at 03:10 UTC
Updated:
29 Jun 2015 at 11:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
damienmckennaIn local testing this worked reasonably well.
Comment #2
damienmckennaResolves a problem if $configurationOptionsJavascript is not an array.
Comment #3
damienmckennaComment #4
matglas86 commentedI rewrote the whole management of adding script to the page. This should solve a lot of problems. Maybe you could review this and see if it works correctly.
Its in my guthub account in the branch features/script-manager
https://github.com/matglas/addthis/tree/features/script-manager
Comment #5
matglas86 commentedHere is the patch comming from the github branch mentioned in #4.
Comment #6
matglas86 commentedMy patch did not apply. Sorry. Here is a new one.
Comment #7
matglas86 commentedThe last upload did not work somehow.
Comment #8
socialnicheguru commentedif I do an update:
The following updates are pending:
addthis module :
7402 -
Do you wish to run all pending updates? (y/n): y
PHP Fatal error: Undefined class constant 'WIDGET_JS_LOAD_TYPE' in /var/aegir/platforms/7/modules/all/addthis/addthis.install on line 77
PHP Stack trace:
PHP 1. {main}() /usr/share/php/drush/drush.php:0
PHP 2. drush_main() /usr/share/php/drush/drush.php:16
PHP 3. _drush_bootstrap_and_dispatch() /usr/share/php/drush/drush.php:61
PHP 4. drush_dispatch() /usr/share/php/drush/drush.php:92
PHP 5. call_user_func_array() /usr/share/php/drush/includes/command.inc:175
PHP 6. drush_command() /usr/share/php/drush/includes/command.inc:175
PHP 7. _drush_invoke_hooks() /usr/share/php/drush/includes/command.inc:208
PHP 8. call_user_func_array() /usr/share/php/drush/includes/command.inc:334
PHP 9. drush_core_updatedb_batch_process() /usr/share/php/drush/includes/command.inc:334
PHP 10. _update_batch_command() /usr/share/php/drush/commands/core/core.drush.inc:1097
PHP 11. drush_batch_command() /usr/share/php/drush/commands/core/drupal/update_7.inc:246
PHP 12. _drush_batch_command() /usr/share/php/drush/includes/batch.inc:93
PHP 13. _drush_batch_worker() /usr/share/php/drush/commands/core/drupal/batch.inc:99
PHP 14. call_user_func_array() /usr/share/php/drush/commands/core/drupal/batch.inc:149
PHP 15. drush_update_do_one() /usr/share/php/drush/commands/core/drupal/batch.inc:149
PHP 16. addthis_update_7402() /usr/share/php/drush/commands/core/drupal/update_7.inc:73
Fatal error: Undefined class constant 'WIDGET_JS_LOAD_TYPE' in /var/aegir/platforms/7/modules/all/addthis/addthis.install on line 77
And the module is not updated.
where is Widget_js_load_type defined?
Comment #9
matglas86 commentedI see the bug. I tried to remove the old variable. But that does not work as the static var with the key is removed from the AddThis class. I do need to fix that. The update statement should be changed to use the old key for WIDGET_JS_LOAD_TYPE.
Comment #10
socialnicheguru commentedI am only getting multiple js added to a page if I goto advanced, check the box, and add the addthis code.
Comment #11
matglas86 commentedI updated some thing based on feedback I received in https://github.com/matglas/addthis/pull/4.
Here is a new patch.
Things that changed.
Comment #12
matglas86 commentedThis is my latest patch. I'm ready to commit it. I tested upgrade from alpha4 without a problem.
Comment #14
matglas86 commented