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
Updating plugins throws errors #120
Comments
Would be interesting to see which plugins are loaded when the error occurs. Unfortunately, the name of the plugins is cut off in the error messages. |
If you could improve the error messages in general, I'd be thankful. I tried that once, but I don't get what s9y is doing in that part. |
Maybe this helps: |
@ddeimeke Could you edit include/compat.inc.php and replace: debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 8); with only: debug_backtrace(); ? This should reveal a full backtrace. You might need to check your output if it contains sensitive passwords and remove them. What would be required for us are the loadPlugin(...) full arguments, because currently as @onli mentioned it is stripped out. |
Did that: https://gist.github.com/ddeimeke/11277312 I do not see anymore. |
@ddeimeke Hhm ok that's strange. Maybe you can edit your serendipity_config_local.inc.php and set $serendipity['production'] = 'debug'; which should enable the more verbose debug error mode, I hope... |
I have a new "Smarty Debug Console", please find the output here: |
And the "FULL DEBUG ERROR MODE" |
The smarty output sadly doesn'T help, and I'm stumped as to why the full debug error mode doesn'T show the extra arguments. You did removfe that DEBUG_BACKTRACE_IGNORE_ARGS right? @ophian do you maybe have a clue?! :-( |
Yes, correct. |
Hm, maybe we can get to it another way. Please edit your include/plugin_api.inc.php file and find the function load_plugin. There you can see several commented $serendipity['debug'] vars. Remove the // in front of all these. Then in your iinclude/compat.inc.php file, just after:
you could please put a:
and hopefully this will give us a better view on at which plugin it seems to fail. |
https://gist.github.com/ddeimeke/bf441d3573a3a4a91a12 "No valid path/filename found. Aborting." sounds interesting. |
I think you patched the probePlugin() method and not load_plugin?! You might want to enable every instance of the $serendipity['debug']['pluginload'] commented variables... |
I missed include/plugin_api.inc.php completely (sorry!) |
I know this is very complicated to remove the PHP internal argument truncation, that it works everywhere. That is why I didn't try to. The cases where you need it are extremly rare, but this one seems to be one of it. Else Dirk could try to enable this $e = new Exception();
var_dump($e->getTrace()); which should hold full arguments. |
The last plugin before the error happens seems to be serendipity_plugin_amazon - do you use that plugin and is it the most recent version (maybe manual upload as long as spartacus doesn't work)? Also, you might want to try moving serendipity_plugin_amazon out of plugins/ (it may not be contained within plugins/ so do not move to a subdirectory of that one, but a parent directory!) and see if that changes anything? Please check your gist file thoroughly for possible passwords, since the debug output tends to hold these! |
Its not amazon only ...
but also
@ddeimeke |
Gists deleted. Plugins deleted. DB password changed. Personal Password changed. I still get the same error. https://gist.github.com/ddeimeke/b5518a88981bb4ce88bd |
Man, that is really annoying to debug. Could you try to move all plugins out of /plugins that are not part of the core distribution and see if that makes a difference? (Moving them will not remote them completely, once you move them back, their config would be restored). Apparently, one of the plugins seems to contain a "$var = &new XXX" code, but I can't see the actual plugin which does that. It could be an outdated plugin in your installation, or a very rarely used one in the spartacus repo that has not been patched yet. We'd need to find the actual culprit. I don't currently have an environment to test spartacus with. @ophian or @yellowled do you have an install where you could i.e. try to patch one plugin to report as an outdated/older version and see if you also get those PHP fatal errors when using spartacus? |
http://board.s9y.org/viewtopic.php?f=10&t=16149 - Point 1 ... My blog is nine years old and I think, I tried nearly every plugin in this time. I will try to find out the plugins that are in the core distribution. |
I would need more detailed info as to what to debug where and how. I edit the version number of any plugin installed using Spartacus to a lower version that the one on Spartacus and update it? |
So, I removed all non-used plugins and it works now.! Question: If a plugin is not used, why is it checked? Question 2: Once I delete a plugin, why is the directory not deleted? Question 3: How do I cleanup the database and remove all configuration not used anymore? |
1: Even if a plugin is not used, it needs to be parsed so that it can be offered to be installed, and also maintained/updated. 2: Serendipity never delets a plugin, but only sets it as "unused". This is to make sure that you can always re-install a plugin, and if you maybe did manual changes, those shall not be simply deleted. 3: There is no specific task for that. The config values are quite low-space so it shouldn't really matter. If you'd need you could use SQL like DELETE FROM serendipity_config WHERE name LIKE '%serendipity_event_XXX%' and do that for all plugins. Of course one could write a script that gathers all installed plugins, and then remove every config var that doesn't match. Could be a nice idea for the maintenance plugin that we have. Now my question would be if you're willing to move the old plugins back one by one to see which one(s) actually caused the error so that we could fix that plugin. ;) However, it might even not be fixable, if the plugin is locally in that state, parsing the plugin would always create the error and spartacus could never upgrade that. Don't really know how we can circumvent that, except maybe when $serendipity['production'] is true we try to suppress the error. That should happen automagically once $serendipity['version'] no longer contains a "-beta" suffix... |
Hmpf, unfortunately I removed the tarfile ... sorry for that. But I really think that the plugin was outdated a very long time. So maybe it was already fixed. Maybe we should head back to the forum. The issue is solved.
|
Dirk, can't you grep for '= &new' in your plugins/ dir?
|
13:43:35 [root:/srv/www/deimeke.net/dirk/blog/plugins] ⌀ grep -lir "&new" *
serendipity_event_geshi/geshi.bak/php-brief.php
serendipity_event_geshi/geshi.bak/php.php
serendipity_event_geshi/geshi/php-brief.php
serendipity_event_geshi/geshi/rebol.php
serendipity_event_geshi/geshi/php.php
serendipity_event_spamblock/.svn/text-base/serendipity_event_spamblock.php.svn-base
serendipity_event_spartacus/.svn/text-base/serendipity_event_spartacus.php.svn-base
serendipity_plugin_remoterss/.svn/text-base/serendipity_plugin_remoterss.php.svn-base |
Does that include the removed non-used plugins? :) |
Unfortunately I do not have them anymore (I deleted the backup tar-file). |
Took a look into my backup, these are the plugins I deleted:
Checked out additional_plugins.git
|
I've just finished catching up on all comments on this issue. I agree that the culprit probably was a very old version of one of the plugins listed. Which of the following things should we do now?
If we decide that some of these points are too much work for now - we're trying to get a release ready after all - let's move them to our todo list so we won't forget them later. |
I think we already have that in our errorHandler, which is extremly finetuned to catch all possibilities with different hosts error settings and the Serendipity 'testing/beta/stable(admin)' debug output fallback chain. To catch the rare ones (like this), we have the linked //print_r($args); in testing, which I think is enough. And, to say this loud, this (new) errorHandler with 1.7 and up, did give us a hell lot of things to repair and notice about since then, which made Serendipity improve and much better, IMHO! So, I for myself would close this issue as fixed, since I am quite sure it were some old plugin occurrences of serendipity_event_aggregator and serendipity_plugin_amazon. And yes, writing an unused plugin directory purger eg. via recursive_directory_iterator() by user request in maintenance sounds like a good idea for the future. |
@garvinhicking The plugin serendipity_event_aggregator uses its own SimplePie lib, which is older than the one in bundled libs. Maybe that is (a hidden/another) breakpoint in this issue.... |
Please help me, I have one problem in understanding the update mechanism. Before I updated to beta1 (and afterwards beta2 via GitHub) I updated all plugins. Why does the updater iterates through all plugins lying in the plugin directory and does not do anything? I would think that the updater finds outdated plugins and offers the update. In case it does not, there is no need to iterate through every plugin in the directory. Please give me the missing link. |
I would say Spartacus (Plugin Updater Check) iterates over all activated or hidden set plugins only. The other (independent) thing is the Serendipity Plugin class behaviour (Garvins answer to 1), which checks/parses all plugins currently stored in /plugins, to get an idea of what could happen next. That is one of the reasons why you cannot have two of the same name, eg. serendipity_class_xyz, or some with breaking errors in the workflow. |
I think this issue is either unclear to me or fixed; please elaborate what the problem is, if there is any reamining, so that we can address it properly. Until then I'll close it. :-) |
Fatal error: Uncaught exception 'ErrorException' with message 'Assigning the return value of new by reference is deprecated' in /path/to//include/compat.inc.php:126
Full error messages
The text was updated successfully, but these errors were encountered: