Shannon Hanson

Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Group membership

Activity

  • Shannon Hanson replied on the discussion topic Question about class instantiation
    RvR   //If you'll insult me (and you're doing it now), you'll be banned here.//   You are right and I am sorry I came in hot. Yes I should have included code but I was posting from my iPad away from my... view reply
  • Shannon Hanson replied on the discussion topic Question about class instantiation
    I don't see what could explain the fatal error in the entity explorer. Could you maybe tell a bit more about the exception? I did not see what caused it either.  As I mentioned the database entries looked fine and a SQL query pulled... view reply
  • Shannon Hanson replied on the discussion topic Question about class instantiation
    Thanks. This one or one like it is what I used as a model.  The file class was being created as expected. That is to say,  I could save it to the database I could be read using entity explorer.  To demonstrate  the following... view reply
  • Shannon Hanson replied on the discussion topic Question about class instantiation
     At no point in my post did I ask you to write code for me, or even correct it. I simply asked for insight as to why something did not work as I would expect it to. I did not find the answer in the community or I would not have wasted time... view reply
  • Shannon Hanson replied on the discussion topic Question about class instantiation
    For the record the code I used to extend the ElggFile class is form the links that were posted   Specifically    use ElggFile; class MotionData extends ElggFile { const SUBTYPE = 'Announcement';... view reply
  • Shannon Hanson replied on the discussion topic Question about class instantiation
    As I said right at the beginning - the drop-down on the iPad shows only numbers instead of the names of the groups. Apparently I choose the wrong number.  My bad. I  was killing some time at the car dealer where I only had my... view reply
  • Shannon Hanson added a new discussion topic Question about class instantiation in the group Beginning Developers
    Sorry if this is in the wrong group.  The drop down select is showing only numbers on my ipad.    I recently encountered a couple of  things and wondered if anyone has any insight that can help understand if this...
    • I don't see what could explain the fatal error in the entity explorer. Could you maybe tell a bit more about the exception?

      I did not see what caused it either.  As I mentioned the database entries looked fine and a SQL query pulled things as expected. I discovered the problem when I tried to pull the entity for a view. the view was creating a blank object for all objects of the custom class type.  The class was (is) registered in elgg-plugin.php.  The same view could pull any other object as expected. The entity explore did not give a lot of info in the error *well not a lot of useful info)  It essentially said the object was empty. 

      I took the two lines from the initialize attributes function and put them in the action and from that point, all object created using the same class work as expected.   


          

    • RvR  

      //If you'll insult me (and you're doing it now), you'll be banned here.//  

      You are right and I am sorry I came in hot. Yes I should have included code but I was posting from my iPad away from my development box, Also I had already deleted/changed the code to make the project work and was simply hoping for some general ideas as to why a class might cause such errors so didn't think code was relevant. My bad

       I will make sure to include code in future posts. 

      I was wrong in my statements to you and I really do appreciate your efforts. that said please try to remember that not all of us are at your level. This is a beginner forum. It is not alwasy easy to ask for help and being told the RTFM and figure it out ourselves is not what we are hoping for.  

    • I did not see what caused it either.  As I mentioned the database entries looked fine and a SQL query pulled things as expected. I discovered the problem when I tried to pull the entity for a view. the view was creating a blank object for all objects of the custom class type.  The class was (is) registered in elgg-plugin.php.  The same view could pull any other object as expected. The entity explore did not give a lot of info in the error *well not a lot of useful info)  It essentially said the object was empty. 
       

      So if you did :

      var_dump(get_entity($guid_of_your_custom_class));

      Does it result in YourCustomClass or in an ElggObject? If it's an ElggObject than your class registration is wrong (it should still be able to show all information stored in the database for this object however).

      Works but when I   substituted my class in instead of EllgFile  it threw errors in the symfonly libraries 

      without seeing a backtrace of the errors, it's hard for me to guess what happened.

      Like i said all looks fine, there must be one (dumb/stupid) thing that is wrong. But finding that one thing is almost always the hardest part ;)

  • Shannon Hanson replied on the discussion topic Use of PHP script in a plugin
    Thank you for your reply.  Hop you are having a great day.    I have read a slightly different version of this Elgg / ajax guide  I will take a closer look at this one. The inbuilt ajax structure seems very... view reply