Admin tools reorder problem

I am having trouble reordering my plugins.  They are in alphabetical order and I can not change the order. 

I am using 1.7.11.  I have tried disabling all plugins and still could not reorder them while they were disabled.  I have disabled the simple cache as well as the file path cache.  Still can not reorder my plugins.

Any suggestions?  More questions?

  • Do you remember when it first started with the plugins being in alphabetical order? Have you upgraded Elgg since then? What 3rd party plugins have you installed? Have you made any modifications in the Elgg core files or might have anyone else changed anything (for example a hired help)?

    I don't know how the order of the plugins is saved. I would assume there's some parameter in the Elgg database for each plugin that saves the priority. Hopefully, someone with more knowledge on Elgg can help with this fact in this thread. I would think that for some unknown reason all plugins on your site have the same priority. Have you ever tried to push a plugin directly to the very top and/or the very bottom? Maybe this would at least alter the priority for this single plugin. Either it would get a lower priority or a higher priority than the others. Maybe this would allow you to reset the priorities of each plugin, one at a time, to some real values again. After each plugin has a different priority again it might be possible to move them up/down one slot again.

  • @iionly: I am not sure just when this started but I do know I have upgraded Elgg at least a couple of times since it started.  I want to say I was using 1.7.6 or .7 when it first started.  I am now using 1.7.11.  I am sure no one but myself has changed anything on my site.  Unless it may have been a hacker that I am not aware of. 

    I have many 3rd party plugins installed.  All or most of them were in place when this started.  Many of them I have upgraded since this started.

    I'm not saying this is a common problem, but I have seen post here before on this subject before and no one has given a solution for it as of yet.

  • I just found this posting here:

    http://community.elgg.org/pg/forum/topic/645814/tool-order-doest-not-work-after-editing-database-help/

    As Brett suggested this piece of code deletes the pluginorder info in the database. I'm not sure though, what will happen once this had been executed. Best would be you could once again move the plugins. In case you try this code, best make a backup of your database first!

    I still wonder, why the order is exactly alphabetical. Either it was a one time flaw that re-ordered the plugins at one time - but why the order is still not changeable then? Or there is some piece of code somewhere that re-orders the list each time you view the plugin list (and the real priority order might still be different). Had you disabled ALL plugins for some reason while executed upgrade.php after a site upgrade?

  • @iionly: At the time they became alphabetical, or close to that time, I was having trouble with excessive memory usage.  I did alter my database using instructions that Evan had posted.  It fixed the memory usage problem.  But I'm not sure if that is when the plugins became alphabetical or not.  Actually they may have been that way awhile before I noticed it.

    I'll try the code that Brett mentioned.

  • But please backup your database first in case it doesn't solve the problem!

    For me it's time to call it a day. I'll ckeck tomorrow evening if you have any news.

  • @iionly: Thanks for the help.  I have backed up my database and tried the code.  No change.

  • Have you installed any completely new plugin since the plugin order started to be alphabetical? If yes, has it be at the end of the list or has it been included in the alphabetic order automatically? If it has been at the end, I would guess the problem is rather due to some database mismatch. If it has been included in the list in alphabetical order, it would rather point to a problem that's not connected with the database - especially as the execution of the code also changed nothing.

    Have you the option to create an Elgg test installation, for example on your own computer (easy on Linux, but also possible in Windows with XAMPP)? Then you could try two different setups:

    1. Using the Elgg files (including all plugins) from your site without any changes, but starting with a fresh and empty database / data directory. If you don't copy the settings.php file from your server, the installation should start from the beginning.
    2. Using the database and data directory from your site but not using any files from the Elgg root directory of your site but instead unmodified archives for Elgg and all used plugins from community.elgg.org. In this case you would need to modify some entries in the database (http://docs.elgg.org/wiki/DuplicateInstallation). You can also directly configure settings.php according to your test installation parameters.

    If you are able to change the order of the plugins in any of this test installations, you know for sure, if it's the database or some error in some source code file... surely the latter option would be much better as you could then fix your site by overwriting the Elgg files with the clean and working files from your second test installation.

  • @iionly: Yes I have added new plugins since this problem has started and they are added to the list in alphabetical order just as the other plugins.  Not at the bottom of the list as they should be.

    I am in the process of setting up xampp now.  This will take awhile since I am new to xampp and am learning as I go.

    Thanks again for your help

  • This is a strange issue ;( I cannot think of what particular type of code changes could be triggering such behaviour. It is if your database metadata <->> metastring may have tht alpha order defined in there *before any new order gets written and so the older alpa sequence always gets picked up before any newer re-sequencing gets loaded.

  • You mentioned that the problem might have started after you fixed the memory problem by using Evan's solution. I guess it's this one:

    http://community.elgg.org/mod/groups/topicposts.php?topic=756584

    As explained by Evan the plugins would all be disabled after executing

    DELETE FROM elgg_metadata WHERE entity_guid=1 AND name_id=3

    At this point you would have to have enabled the plugins again. I wonder if you remember if everything was alright at enabling them again. I guess it would also be possible to repeat the process of deletion and to enable the plugins again afterwards (of course again only after a backup of the database).

    Have you ever executed Cash's database validator plugin? If not, you could at least run the validation of the database to see if there are any errors noticed. In case there are any errors found, the repair should be done only after a backup of the database, too.