#1
|
||||
|
||||
Error messages~
Hello! c: It's me again.. Recently my host moved some sites over to a different server (or something like that..) and so my site was one of the ones that moved. However, now I am getting a ton of error messages. I am not experienced in coding at all, so this is all foreign language to me. Does anyone know how I could fix it? c: Thanks for any help<3
This is on the page to use an item: "Strict Standards: Declaration of DropdownList::add() should be compatible with GUIContainer::add(GUIComponent $component, $index = -1) in /home/capifore/public_html/classes/class_dropdownlist.php on line 184" And these also show up on the ACP: "Strict Standards: Declaration of AdminSidebar::setDivision() should be compatible with Sidebar::setDivision(GUIComponent $module) in /home/capifore/public_html/classes/class_adminsidebar.php on line 18 Warning: Cannot modify header information - headers already sent by (output started at /home/capifore/public_html/classes/class_adminsidebar.php:18) in /home/capifore/public_html/classes/class_cookies.php on line 109 Warning: Cannot modify header information - headers already sent by (output started at /home/capifore/public_html/classes/class_adminsidebar.php:18) in /home/capifore/public_html/classes/class_cookies.php on line 111 Warning: Cannot modify header information - headers already sent by (output started at /home/capifore/public_html/classes/class_adminsidebar.php:18) in /home/capifore/public_html/classes/class_view.php on line 257" |
#2
|
||||
|
||||
Well these are just warning messages that do not affect your script, but such messages are annoyingt. To fix that, go to file class_adminsidebar.php and change the method add() to add(GUIComponent $component = NULL, $index = -1).
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#3
|
||||
|
||||
Thank you! But I can't seem to find the exact spot you are talking about. |D
Here's the class_adminsidebar.php if it helps at all. I've tried searching for the method add(), but I'm not sure which one. ^^; Code:
<?php use Resource\Collection\ArrayList; /** * The AdminSidebar Class, defines a unique Admin Control Panel Sidebar. * It extends from the Sidebar class, although it does not really have much to do with the parent class. * @category Resource * @package Widget * @author Hall of Famer * @copyright Mysidia Adoptables Script * @link http://www.mysidiaadoptables.com * @since 1.3.3 * @todo Not much at this point. * */ class AdminSidebar extends Sidebar implements Initializable{ /** * Constructor of AdminSidebar Class, it initializes basic sidebar properties * @access public * @return Void */ public function __construct(){ $this->initialize(); } /** * The setDivision method, setter method for property $division. * It is set internally upon object instantiation, cannot be accessed in client code. * @param ArrayList $components * @access protected * @return Void */ protected function setDivision($components){ $this->division = new Division($components); $this->division->setClass("sidebar"); } /** * The initialize method, sets up the entire admin sidebar. * @access public * @return Void */ public function initialize(){ $components = new ArrayList; $components->add(new Division(new Link("admincp", "Dashboard"))); $components->add(new Division(new Comment("Adoptable", FALSE))); $adoptable = new Division; $adoptable->add(new Link("admincp/adopt/add", "Create New Adoptables")); $adoptable->add(new Link("admincp/adopt/edit", "Edit Existing Adoptables")); $components->add($adoptable); $components->add(new Division(new Comment("Adopt Levels", FALSE))); $level = new Division; $level->add(new Link("admincp/level/add", "Add Levels")); $level->add(new Link("admincp/level/edit", "Edit Levels")); $level->add(new Link("admincp/level/delete", "Delete Levels")); $level->add(new Link("admincp/level/settings", "Level Settings")); $level->add(new Link("admincp/level/daycare", "Daycare Settings")); $components->add($level); $components->add(new Division(new Comment("Owned Adoptables", FALSE))); $ownedAdoptable = new Division; $ownedAdoptable->add(new Link("admincp/ownedadopt/add", "Give Adopt to User")); $ownedAdoptable->add(new Link("admincp/ownedadopt/edit", "Manage Users Adopts")); $ownedAdoptable->add(new Link("admincp/ownedadopt/delete", "Delete Users Adopts")); $components->add($ownedAdoptable); $components->add(new Division(new Comment("Breeding", FALSE))); $breeding = new Division; $breeding->add(new Link("admincp/breeding/add", "Create new Breed Adopt")); $breeding->add(new Link("admincp/breeding/edit", "Update Existing Breed Adopt")); $breeding->add(new Link("admincp/breeding/delete", "Delete Breed Adopt")); $breeding->add(new Link("admincp/breeding/settings", "Change Breeding Settings")); $components->add($breeding); $components->add(new Division(new Comment("Images", FALSE))); $image = new Division; $image->add(new Link("admincp/image/upload", "Upload Images")); $image->add(new Link("admincp/image/delete", "Erase Images")); $image->add(new Link("admincp/image/settings", "Adoptable Signature Image/GD Settings")); $components->add($image); $components->add(new Division(new Comment("Users", FALSE))); $users = new Division; $users->add(new Link("admincp/user/edit", "Manage Users")); $users->add(new Link("admincp/user/delete", "Delete Users")); $components->add($users); $components->add(new Division(new Comment("Usergroups", FALSE))); $usergroups = new Division; $usergroups->add(new Link("admincp/usergroup/add", "Add Usergroup")); $usergroups->add(new Link("admincp/usergroup/edit", "Edit Usergroup")); $usergroups->add(new Link("admincp/usergroup/delete", "Delete Usergroup")); $components->add($usergroups); $components->add(new Division(new Comment("Items", FALSE))); $items = new Division; $items->add(new Link("admincp/item/add", "Create an Item")); $items->add(new Link("admincp/item/edit", "Manage Items")); $items->add(new Link("admincp/item/delete", "Delete Items")); $items->add(new Link("admincp/item/functions", "Browse Item Functions")); $components->add($items); $components->add(new Division(new Comment("Inventory", FALSE))); $inventory = new Division; $inventory->add(new Link("admincp/inventory/add", "Give Item to User")); $inventory->add(new Link("admincp/inventory/edit", "Edit User Inventory")); $inventory->add(new Link("admincp/inventory/delete", "Delete Users items")); $components->add($inventory); $components->add(new Division(new Comment("Shops", FALSE))); $shops = new Division; $shops->add(new Link("admincp/shop/add", "Add a Shop")); $shops->add(new Link("admincp/shop/edit", "Edit Shops")); $shops->add(new Link("admincp/shop/delete", "Delete Shops")); $components->add($shops); $components->add(new Division(new Comment("Trade", FALSE))); $shops = new Division; $shops->add(new Link("admincp/trade/add", "Create a Trade")); $shops->add(new Link("admincp/trade/edit", "Update Trades")); $shops->add(new Link("admincp/trade/delete", "Remove Trades")); $shops->add(new Link("admincp/trade/moderate", "Moderate Trades")); $shops->add(new Link("admincp/trade/settings", "Change Trade Settings")); $components->add($shops); $components->add(new Division(new Comment("Content", FALSE))); $content = new Division; $content->add(new Link("admincp/content/add", "Add a Custom Page")); $content->add(new Link("admincp/content/edit", "Edit Custom Pages")); $content->add(new Link("admincp/content/delete", "Delete Custom Pages")); $components->add($content); $components->add(new Division(new Comment("Module", FALSE))); $module = new Division; $module->add(new Link("admincp/module/add", "Create new Module")); $module->add(new Link("admincp/module/edit", "Edit Modules")); $module->add(new Link("admincp/module/delete", "Delete Modules")); $components->add($module); $components->add(new Division(new Comment("Widget", FALSE))); $widget = new Division; $widget->add(new Link("admincp/widget/add", "Create new Widget")); $widget->add(new Link("admincp/widget/edit", "Edit Widgets")); $widget->add(new Link("admincp/widget/delete", "Delete Widgets")); $components->add($widget); $components->add(new Division(new Comment("Links", FALSE))); $links = new Division; $links->add(new Link("admincp/links/add", "Add a link")); $links->add(new Link("admincp/links/edit", "Edit a link")); $links->add(new Link("admincp/links/delete", "Delete a Link")); $components->add($links); $components->add(new Division(new Comment("Promocodes", FALSE))); $promo = new Division; $promo->add(new Link("admincp/promo/add", "Create New Promocode")); $promo->add(new Link("admincp/promo/edit", "Edit Promocodes")); $promo->add(new Link("admincp/promo/delete", "Delete Promocodes")); $components->add($promo); $components->add(new Division(new Comment("Themes", FALSE))); $theme = new Division; $theme->add(new Link("admincp/theme/add", "Add/Install New Theme")); $theme->add(new Link("admincp/theme/edit", "Update Themes")); $theme->add(new Link("admincp/theme/delete", "Delete Themes")); $theme->add(new Link("admincp/theme/css", "Additional CSS")); $components->add($theme); $components->add(new Division(new Comment("Settings", FALSE))); $settings = new Division; $settings->add(new Link("admincp/settings/globals", "Basic Settings")); $settings->add(new Link("admincp/settings/pound", "Pound Settings")); $settings->add(new Link("admincp/settings/plugin", "View Plugins")); $components->add($settings); $components->add(new Division(new Comment("Advertising", FALSE))); $ads = new Division; $ads->add(new Link("admincp/ads/add", "Create New Ad")); $ads->add(new Link("admincp/ads/edit", "Edit Current Campaigns")); $ads->add(new Link("admincp/ads/delete", "Delete Existing Campaigns")); $components->add($ads); $this->setDivision($this->addClass($components)); } /** * The addClass method, loops through the components array and add classes for each component. * It is set internally upon object instantiation, cannot be accessed in client code. * @param ArrayList $components * @access protected * @return ArrayList */ protected function addClass(ArrayList $components){ $components->get(0)->setClass("accordionButton"); for($i = 1; $i < $components->size(); $i += 2){ $components->get($i)->setClass("accordionButton"); $components->get($i + 1)->setClass("accordionContent"); } return $components; } } ?> |
#4
|
||||
|
||||
Try setDivision() in class_adminsidebar.php to setDivision(GUIComponent $components) and class_DropdownList.php's add() to add(GUIComponent $component, $index = -1)
__________________
asp.net stole my soul. |
#5
|
||||
|
||||
((Sorry for the late reply. I get really busy with school and I had an AP test today. ^^;)
I still am not able to find exactly where you're talking about? I try to find "add()", but it says not found. ^^; <3 |
#6
|
|||
|
|||
I was bored since no one has helped me yet, so I decided to research this... stack overflow explains this quite well (although I'm still a little lost since I know very little about php lol)
http://stackoverflow.com/questions/1...ompatible-with http://stackoverflow.com/questions/1...e-with-that-of It seems the problem is because this function in class_sidebar: Code:
/** * The setDivision method, setter method for property $division. * It is set internally upon object instantiation, cannot be accessed in client code. * @param GUIComponent $module * @access protected * @return Void */ protected function setDivision(GUIComponent $module){ if(!$this->division){ $this->division = new Division; $this->division->setClass("sidebar"); } $this->division->add($module); } Code:
/** * The setDivision method, setter method for property $division. * It is set internally upon object instantiation, cannot be accessed in client code. * @param ArrayList $components * @access protected * @return Void */ protected function setDivision($components){ $this->division = new Division($components); $this->division->setClass("sidebar"); } Either that, or it has something to do with the bug with the order classes are defined and extended. https://bugs.php.net/bug.php?id=46851 The same should apply to the drop down one... Either way, you might try turning off strict error reporting (something to do with a php.ini file I think) and see if your site works just fine. My guess is that the php version or setup on the new server is different, and it's possible (I think) that strict error reporting was turned off before otherwise you might have seen the same messages before. Hopefully Hall Of Famer can shed a little more light on this, since all of my knowledge comes from an hour of googling because this caught my interest. All I can give is information, but I can't tell you what to do with it cause I'm clueless. I have read at least 50 pages of this section of the forum, and I think previous advice was to turn off strict error reporting, but I can't remember for sure. Same goes for changing something to suppress the warnings about the headers. That is just telling you that something else on the page already sent headers, so it can't send them again... and previous posts in this forum have suggested they aren't important so just hide them. HEY, I just noticed something.... could it be because one is a GUIComponent parameter and the other is an ArrayList? |
#7
|
||||
|
||||
Yes, incompatible declarations are when a function's parameters don't match its parent's function parameters for example. Class AdminSidebar extends from Sidebar, so the function's parameters should have the same type, the one in adminsidebar doesn't have a type, that's why I said to put a GUIComponent before the variable name.
PHP doesn't care much about variable types, you don't even need to give them a type, that's why it's just a warning. And the add function is in class_dropdownlist.php file as public function add($option, $index = -1) ^^
__________________
asp.net stole my soul. Last edited by IntoRain; 05-09-2014 at 07:40 AM. |
#8
|
||||
|
||||
(Late reply again..:S)
I still have no clue what you are talking about. |D I understand that the problem is with the class_sidebar and some other things, but I don't understand what you mean, and what I need to replace to fix it. c:<3 |
#9
|
||||
|
||||
In class_adminsidebar.php, find this:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
__________________
asp.net stole my soul. |
#10
|
||||
|
||||
Thanks! c: But whenever I change it in the class_adminsidebar it says
"Catchable fatal error: Argument 1 passed to AdminSidebar::setDivision() must be an instance of GUIComponent, instance of Resource\Collection\ArrayList given, called in /home/capifore/public_html/classes/class_adminsidebar.php on line 187 and defined in /home/capifore/public_html/classes/class_adminsidebar.php on line 36" The other problem seems to be fixed<3 c: Last edited by Pear; 05-31-2014 at 04:45 PM. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Warning Messages (more) | Abronsyth | Questions and Supports | 4 | 10-04-2014 07:40 PM |
Better Messages Buttons | Inf3rnal | Mys v1.2.x Mods | 2 | 10-28-2011 12:11 PM |
Help: messages and email | Isura | Questions and Supports | 1 | 07-24-2011 03:09 PM |
Delete All Messages in Inbox Mod [by Kae] | Kaeliah | Mys v1.2.x Mods | 0 | 04-02-2011 03:30 AM |
Modding Suggestion: Error Messages | HIddenPanda | Suggestions and Feature Requests | 2 | 02-05-2011 10:46 PM |
What's New? |
What's Hot? |
What's Popular? |