Hello, this is not exactly a bump.
I forgot about this for some time, been doing some other stuff...
Now it got to me that I have to finish this edit thingy, so I'm back on it again.
What i did so far:
nothing much... thing still doesn't work
it's a work in progress. I will upload all of the important files so you can help me, yes?
The problem:
[Warning] reset() expects parameter 1 to be array, null given
GET /ss/svijet-sigurnosti/lotd/post/45/
Line 102 in /var/www/ss/sapphire/core/ClassInfo.php
Source
93 * Return the root data class for that class.
94 * This root table has a lot of special use in the DataObject system.
95 *
96 * @param mixed $class string of the classname or instance of the class
97 * @return array
98 */
99 static function baseDataClass($class) {
100 global $_ALL_CLASSES;
101 if (is_object($class)) $class = get_class($class);
102 reset($_ALL_CLASSES['parents'][$class]); <============ this here is problem
103 while($val = next($_ALL_CLASSES['parents'][$class])) {
104 if($val == 'DataObject') break;
105 }
106 $baseDataClass = next($_ALL_CLASSES['parents'][$class]);
107 return $baseDataClass ? $baseDataClass : $class;
108 }
The idea:
as I said, it's a work in progress, some things are not done yet and so the template might not make sense, but I have been changing some stuff so I can edit it.
Izmjeni in template is supposed to be the link for edit, Brisanje is link for delete. Delete works, edit does not.
GetLOTDs is looping through all of LOTDs and in template I am displaying them all in <% control GetLOTDs %>
While displaying them I am creating links for delete and edit, as I have said be4, delete works, permissions work, edit does not.
The idea - pressing Izmijeni (edit) calls EditURL that is gonna form a link with calling function post in LOTDPage and givind the LOTD $ID to it. Post basically calls function for editing LOTD and places it on "page" with $page->renderWith('Page');
As far as I can see, this "should" work, or sth simmilar, cause edit in blog module works like this...
I must have made some mistake, don't know where.
Could som1 debug/fix this for me?
While you're at it, don't know how to make tags work, but this is more important.
Thank you!