Elxis CMS Forum

Support => General => Topic started by: netamaster on April 13, 2011, 18:01:20

Title: frontend problems
Post by: netamaster on April 13, 2011, 18:01:20
Hello sirs,

i'm new at elxis cms. i have a website to fix.

for some strange problem. The site looks nice at the domain, but on localhost
i have admin, and i don't have frontend. I've placed debugs and all queries seem to return the correct
results, but the frontend at my localhost is broken and
nothing is displayed. I've placed on everyfolder 777 to be sure everything will be ok, but not :(

Thank You for Your fast response!
regards
netamaster

Note by datahell: Please don't write e-mail addresses in clear text
Title: Re: frontend problems
Post by: ks-net on April 13, 2011, 19:49:45
Quote
The site looks nice at the domain, but on localhost
i have admin, and i don't have frontend
localhost? mean your local computer?
admin?
Title: Re: frontend problems
Post by: netamaster on April 13, 2011, 20:29:43
Dear sir,
Yes.
I've downloaded to my computer, everything database and code.
Before this i've installed on local pc - apache, mysql etc.. and when i've opened the first login page appears ok, But after login everything is looking as it has crashed..
I've placed the debugs, i've seen all queries tested many and they are ok, some returning results
some not.
But the page doesn't show menus, links, pictures etc..

best regards
netamaster
Title: Re: frontend problems
Post by: ks-net on April 13, 2011, 22:15:55
you must modify  configuration.php  and change paths  etc.. to match your local paths
Title: Re: frontend problems
Post by: netamaster on April 13, 2011, 22:22:34
10x
for that advice already did it :(
and other things i've made in configuration...
i've changed
$mosConfig_absolute_path = 'root of the project';
$mosConfig_cachepath = 'cache folder in the project';

seems not a database problem, cause it's connecting..
Title: Re: frontend problems
Post by: ks-net on April 13, 2011, 22:41:40
do you get any php errors?

did you checked apache error-logs?

have checked the html code of the broken-structure-page to see where trying  to get images/css etc... from?

have you checked-searched the database with text-editor to see if there are urls that pointing to places other than your local computer?
Title: Re: frontend problems
Post by: netamaster on April 13, 2011, 22:54:30
i've checked everything and started by template searching..
and found the first error - no menu..
the real code is very simple.. i'm still searching where exactly is the problem..
private function getcategories() {
      global $database, $my, $cur_template,$mainframe, $lang;
      $access = !$mainframe->getCfg('shownoauth');
        $query="SELECT * FROM #__menu WHERE menutype='".$this->tparams['menutype']."' AND published='1' AND ((language IS NULL) OR (language LIKE '%".$lang."%'))"
        .($access ? "\n AND access IN (".$my->allowed.")" : '')
        ."\n ORDER BY ordering ASC";
      $database->setQuery($query);
      $cats = $database->loadRowList('id');

    var_dump($cats); // THIS IS EMPTY...

      if (!$cats) { return array(); }
...........


it's obviously db problem
but not sure what kind of it is.. i've set user and password.. and got no error..

regards
netamaster
Title: Re: frontend problems
Post by: ks-net on April 14, 2011, 00:04:11
you must go the other way around...

you started wrong...

elxis is well-tested in thousand pcs local and remote...

what you should  look for is :

1- php errors
2- db errors
3- server errors


do not test elxis code...  no need

the problem is in your configuration
Title: Re: frontend problems
Post by: netamaster on April 14, 2011, 00:21:03
i've emptied
apache and mysql log files, refreshed the site..
and the same again
i've placed everything to see the php errors also.. and none.

the query is: SELECT * FROM #__menu WHERE menutype='topmenu' AND published='1' AND ((language IS NULL) OR (language LIKE '%english%')) AND access IN (19,20,21,18,29,24,23,25,30) ORDER BY ordering ASC
in the function above i've written just doesn't bring anything.
if i remove ((language IS NULL) OR (language LIKE '%english%')) AND
works.
The language selected in configurations both local and official is english.
:(
Title: Re: frontend problems
Post by: ks-net on April 14, 2011, 00:56:18
you don't have to touch such internal functions to make your elxis work?

since this is a local system i can not see it (unless you have configure NAT and give me external ip)

since i can not see i can not give much help to you ...

only i can say is that your local system must be configured correctly...

you said that the online version works with no problems... so is the local system that needs actions!
Title: Re: frontend problems
Post by: netamaster on April 14, 2011, 01:12:12
i've just sent you the details as private message
hope you have it..

thanks for the help in advance
Title: Re: frontend problems
Post by: netamaster on April 14, 2011, 03:07:59
So we've fixed the problems

actually the problems were from the different dump that i've got from the official website - from Elxis administrator panel
in respect of the phpmyadmin dump.

When i've imported your dump it's differently understood than the dump from phpmyadmin.
Maybe i've missed some setting, but anyway this was the problem

regards
netamaster