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

Issues with dropbox #16

Open
raba34 opened this issue May 2, 2018 · 6 comments
Open

Issues with dropbox #16

raba34 opened this issue May 2, 2018 · 6 comments

Comments

@raba34
Copy link

raba34 commented May 2, 2018

Hello,

I try to include files from the dropbox in pages. This opens the fileselector. So I can see my files in Dropbox. But when I try to include a file in the page, it does not go on.

The Errorlog contains the entry below.

I use Mahara 18.04 at Ubuntu 16.04 LTS.

Your patch
patch -p0 < htdocs/artefact/cloud/htdocs_view_blocks.patch
doesn't work. So I had inserted the lines manually.

What can you do?

Ralph

Content of error log

19258#0: *553410 FastCGI sent in stderr: "PHP message: [WAR] 1d (artefact/cloud/blocktype/dropbox/lib.php:18) Declaration of PluginBlocktypeDropbox::instance_config_form($instance) should be compatible with PluginBlocktype::instance_config_form(BlockInstance $instance)
PHP message: Call stack (most recent first):
PHP message: * log_message(string(size 159), integer, true, true, string(size 92), integer) at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpdocs/lib/errors.php:521
PHP message: * error(integer, string(size 159), string(size 92), integer, array(size 11)) at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpdocs/artefact/cloud/blocktype/dropbox/lib.php:18
PHP message: * require_once("/var/www/vhosts/mahara.osz-lise-meitner.eu/httpdoc...") at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpdocs/lib/mahara.php:1621
PHP message: * safe_require(string(size 9), string(size 7)) at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpdocs/blocktype/lib.php:1114
PHP message: * BlockInstance->build_configure_form() at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpdocs/view/blocks.php:71
PHP message:
PHP message: [WAR] 1d (artefact/cloud/blocktype/dropbox/lib.php:18) Declaration of PluginBlocktypeDropbox::save_config_options($form, $values) should be compatible with Plugin::save_config_options(Pieform $form, $values)
PHP message: Call stack (most recent first):

PHP message: * log_message(string(size 152), integer, true, true, string(size 92), integer) at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpdocs/lib/errors.php:521
PHP message: * error(integer, string(size 152), string(size 92), integer, array(size 11)) at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpdocs/artefact/cloud/blocktype/dropbox/lib.php:18
PHP message: * require_once("/var/www/vhosts/mahara.osz-lise-meitner.eu/httpdoc...") at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpdocs/lib/mahara.php:1621
PHP message: * safe_require(string(size 9), string(size 7)) at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpd

@anzeljg
Copy link
Collaborator

anzeljg commented May 2, 2018

Ralph hi.

Thank you for reporting this issue.

Regarding the patch: I am thinking of adding a feature which would allow to "patch" all necessary files from plugin administration area via simple click on the "Patch core files" button or something similar.
This is also one of the whishlist items here, on this Issues page...

Regarding the Dropbox (and probably also all other) blocktype: The error log is quite helpful, so thank you again. From the error log I can see that probably the instance_config_form() and save_config_options() functions have been changed in Mahara core.

As the error log suggests:

  1. Please find instance_config_form() function (file: artefact/cloud/blocktype/dropbox/lib.php) and change instance_config_form($instance) to instance_config_form(BlockInstance $instance). Simply add: BlockInstance
  2. Then find save_config_options() function (in the same file) and change save_config_options($form, $values) to save_config_options(Pieform $form, $values). Simply add: Pieform

That should do it. Please let me know if it works...

I plan to update the plugin in a week or two.

@raba34
Copy link
Author

raba34 commented May 3, 2018

Hello Gregor,

thank you very much for your quick answer.

I had made the changes, but it don't work. The error message is:

25053#0: *890810 FastCGI sent in stderr: "PHP message: [WAR] f1 (artefact/cloud/blocktype/dropbox/lib.php:564) HTTP status: 400 Bad Request PHP message: Call stack (most recent first): PHP message: * log_message(string(size 28), integer, true, true) at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpdocs/lib/errors.php:95 PHP message: * log_warn(string(size 28)) at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpdocs/artefact/cloud/blocktype/dropbox/lib.php:564 PHP message: * PluginBlocktypeDropbox::get_filelist(string(size 1), array(size 1), string(size 1)) at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpdocs/artefact/cloud/blocktype/dropbox/lib.php:53 PHP message: * PluginBlocktypeDropbox::render_instance(object(BlockInstance), true) at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpdocs/lib/mahara.php:1809 PHP message: * call_static_method(string(size 22), string(size 15), object(BlockInstance), true) at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpdocs/blocktype/lib.php:899 PHP message: * BlockInstance->render_editing() at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpdocs/lib/view.php:2126 PHP message: * View->build_column(integer, integer, true, false) at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpdocs/lib/view.php:2087 PHP message: * View->build_columns(integer, true, false) at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpdocs/lib/view.php:2072 PHP message: * View->build_rows(true) at /var/www/vhosts/mahara.osz-lise-meitner.eu/httpdocs/view/blocks.php:204 PHP message:" while reading response header from upstream

Ralph

@anzeljg
Copy link
Collaborator

anzeljg commented May 3, 2018

Ralph hi.

Looking into error log it seems that Dropbox block works correctly on Mahara side, but "HTTP status: 400 Bad Request" error message indicates that something is wrong when sending request to Dropbox API. They might have changed some thing(s).

I will have a look - hopefully next week and I will let you know...

@raba34
Copy link
Author

raba34 commented May 3, 2018

Maybe a comparison with Moodle helps: with Moodle 3.4.1+ (Build: 20180308) the connection works.

@raba34
Copy link
Author

raba34 commented Jun 6, 2018

I wanted to ask carefully, if a solution to the problem is already in prospect.

Greeting
Ralph

@raba34
Copy link
Author

raba34 commented Sep 14, 2018

Once again

I wanted to ask carefully, if a solution to the problem is already in prospect.

Greeting
Ralph

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

2 participants