Chris

Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Activity

  • Chris commented on the plugin pages_move
    @t_om, you should only be able to change the level of a subpage within a toppage. I noticed in version 0.5 that I wasn't checking the subtype of the page, and it that the code was erroneously letting users move toppages. Moving a toppage would...
  • Chris commented on the plugin pages_move
    @Shouvik, I've uploaded a version for Elgg 1.7 (it's version 0.5). I don't have 1.7 running on my CPU to test it out, but it should work. Please let me know your results.
  • Chris uploaded a new plugin: pages_move
  • Chris commented on the plugin Folder
    Oh, I forgot to mention that I scraped my initial changed and followed your advice of replacing >$tfiles = elgg_get_entities(array('types' => 'object', 'subtypes' => 'file', 'container_guid' =>...
  • Chris commented on the plugin Folder
    Hi txtan, Thanks for the reply. I think I figured out the problem. Elgg 1.6.2's get_entity_relationships() function doesn't support inverse relationships. I updated the core file (I know, bad form) to allow it to check inverse relationships, and...
  • Chris commented on the plugin Folder
    @txtan, @iionly & @Canterbudy: I think I might have gotten it to work for 1.6.2. My initial tests seem to be working (with drag and drop), though it doesn't remove files from 'Unspecified' when you move them into a folder, but that might be how...
  • Chris replied on the discussion topic InvalidParameterException All files must have an owner! in the group General Discussion
    InvalidParameterException All files must have an owner! Please helppppppppppppp  Im running nuts. I deleted a user in the databse and i started getting this problem..this happened yesterday and since then, when i go to members or user...
    • I just chage the if expressión and commented, and after this it's run perfectly, any problem about this solutión?

      public function getFilenameOnFilestore(ElggFile $file){
                              $owner = $file->getOwnerEntity();
                              if (!$owner)
                                      $owner = get_loggedin_user();

                             // if ((!$owner) || (!$owner->username)) throw new InvalidParameterException(sprintf(elgg_echo('InvalidParameterException:MissingOwner'), $file->getFilename(), $file->guid));

                              return $this->dir_root . $this->make_file_matrix($owner->username) . $file->getFilename();
      }

    • Usually the reason this happens is because you have an entry in elggentities that has been orphaned.  Elgg has four tables of the form "elggXXX_entity" they're listed below:

      elgggroups_entity
      elggobjects_entity
      elggsites_entity
      elggusers_entity

      It also has an elggentities table that stores information about all entities in the database.  All five of these tables have a guid key that identifies the entity in a database-unique way.  Anyway, this problem arises when you have a guid in the elggentities table that doesn't have a match in the corresponding elggXXX_entity table.  You can fix this by running a few delete queries to clean up any orphaned links.  These four queries are the ones I used:

      delete from elggentities where type = 'group' and not exists (select guid from elgggroups_entity where guid = elggentities.guid);
      delete from elggentities where type = 'object' and not exists (select guid from elggobjects_entity where guid = elggentities.guid);
      delete from elggentities where type = 'site' and not exists (select guid from elggsites_entity where guid = elggentities.guid);
      delete from elggentities where type = 'user' and not exists (select guid from elggusers_entity where guid = elggentities.guid);

      You should obviously back up your database before running these.  This solved my problem, though.

    • Rightie-O
      yr sql code fixer looks good !
      this problem has progressed to version 3 here --
      http://community.elgg.org/mod/groups/topicposts.php?topic=390431&group_guid=52477
      have look
      maybe catch yr interest ;-O

       

  • Chris joined the group General Discussion