Missing argument - what does it mean?

Permalink
Warning: Missing argument 1 for Area::display(), called in C:\HostingSpaces\saiacsedu\saiacs.edu.in\wwwroot\themes\SAIACS THEME\elements\header.php on line 54 and defined in C:\HostingSpaces\saiacsedu\saiacs.edu.in\wwwroot\concrete\models\area.php on line 361


Please explain how I can fix this.

Thanks

trixiemay
 
FernandoCordeiro replied on at Permalink Reply
FernandoCordeiro
Hey,

First of all, edit this:
C:\HostingSpaces\FOLDER\URL\


Seriously, security reasons.

Ok, for the issue (But seriously, edit that even if this solves it):

I believe you made a custom theme.

FIRST THING: Duplicate the header.php file and add "Backup" or something to the duplicate name. If nothing makes it better, you can just go back to the original.


Now for what I think you should try:


1 - Take a closer look at the call for the areas in your theme:

<?php
//AREA_NAME must be an area name.
//If that seems broken, try a different name.
//I suggest only lowercase letters.

$a = new Area('AREA_NAME');

//Never forger the order of the arguments.
//The Variable you created -> display($c).

//don't ask me why, I didn't code it.
//It just works like this.

$a->display($c);

?>


If that doesn't solve it, let's take a look at the other needed parts:

2 - The FIRST LINE in your theme should be:
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?>

Seriously, not a single blank space before it, no nothing. This is the most important thing. Without opening the PHP Tag in the first line, the server assumes no headers were given and auto-generates them. Then all kinds of issues surface.


3 - Open the Head tag like this:
<head>
<?php Loader::element('header_required'); ?>

Check this bit carefully, it's as important as it gets.




See if that solves it and post back.