Module Statistic 1.0 rc2

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
TeXnik
Forum Members
Forum Members
Posts: 132
Joined: Thu Aug 07, 2008 12:45 pm
Location: Thailand

Module Statistic 1.0 rc2

Post by TeXnik »

After updating to the most recent release of the statistic module (1.0rc2), the module does not tell me anymore which pages had been visited.
Now it shows "--Add Me - module:Statistic..." instead of the page title.
Does the module do not support MLE anymore?, Previous version worked well and had been a good help to determine the interests of the visitors.

I updated to the version 1.0 without any improvement.
Last edited by TeXnik on Mon Apr 12, 2010 10:06 am, edited 1 time in total.
Peciura

Re: Module Statistic 1.0 rc2

Post by Peciura »

Code: Select all

"--Add Me - module:Statistic..." 
It is standard behavior of CMSms and  indicates that string is missing in module language file e.g. "en_US.php". Double check if all files are uploaded correctly. Or create your own file with missing strings and place it to "/module_custom/Statistic/lang"
TeXnik
Forum Members
Forum Members
Posts: 132
Joined: Thu Aug 07, 2008 12:45 pm
Location: Thailand

Re: Module Statistic 1.0 rc2

Post by TeXnik »

So I assume, that the programming changed, because in the previous releases below 1.x, the problem did not occur and showed me the visited pages.

Any idea where to look in the module and how to rectify this?

It was a useful tool to see which pages had been visted most an which never. This enabled me to adjust the pages or the content.

The module Vistorstats shows which pages (and it shows the page in the full string) had been visited and how long a vistitor staed, but this module does not count the pages.
Peciura

Re: Module Statistic 1.0 rc2

Post by Peciura »

It is "/module/Statistics/lang/en_US.php" where translation is missing. A translation key is just after "--Add Me - module:Statistic..."

Also new version is out - try it.
TeXnik
Forum Members
Forum Members
Posts: 132
Joined: Thu Aug 07, 2008 12:45 pm
Location: Thailand

Re: Module Statistic 1.0 rc2

Post by TeXnik »

It seems not that there is a translation missing, I checked the old files and the new ones.

For me it looks like the handover of variables (the contend of the pageID) is going wrong. As I wrote, when I used 0.93 the pages visited  had been shown (the title of the page), where now only "Add me...." shows up.

Now I will try the version 1.0.1.

With this version one menuitem is shown "Home"

I believe I have to make something with the template

Code: Select all

{foreach from=$entries item=entry}
  {$entry->index}. {cms_selflink page=$entry->alias text=$entry->title} <br/>
{/foreach}
but unfortunately I do not know what to show the items from the different languages.
Last edited by TeXnik on Thu Apr 15, 2010 9:22 am, edited 1 time in total.
gdur
Forum Members
Forum Members
Posts: 142
Joined: Sun Jan 10, 2010 10:59 am

Re: Module Statistic 1.0 rc2

Post by gdur »

Hi,

Until now no response anymore....

Installed Statistics today and ran into the same problem as described in this thread. Sadly enough no fix yet. This can only be MLE related. Installed the same on a standard CMSMS install and then it works perfect.
So dived into the content table as see that the values of column content_name are all NULL exept Home for the home page. The real names reside in to column content_name_en. Same for menu_text column. So I guess Statistics is pulling the titles either from content_name or menu_text. Why MLE does not uses these columns as well puzzles me.
Can anyone shine some light on this please????

OK found a fix, maybe not as nice as it should but here we go:

Edit modules/Statistics/Statistics.module.php starting at line 1105.
change $query="SELECT content_name,menu_text FROM ".cms_db_prefix()."content WHERE content_alias=? OR content_id=?";
into
$query="SELECT content_name_en,menu_text_en FROM ".cms_db_prefix()."content WHERE content_alias=? OR content_id=?";

line 1109 change
$name=trim($row["content_name"]);
into
$name=trim($row["content_name_en"]);

line 1110 change
if ($name=="") $name=trim($row["menu_text"]);
into
if ($name=="") $name=trim($row["menu_text_en"]);

line 1111 change
if (trim($row["menu_text"])!="" && $forcemenutext) $name=trim($row["menu_text"]);
into
if (trim($row["menu_text_en"])!="" && $forcemenutext) $name=trim($row["menu_text_en"]);
Last edited by gdur on Sun May 30, 2010 9:23 pm, edited 1 time in total.
Peciura

Re: Module Statistic 1.0 rc2

Post by Peciura »

So I guess Statistics is pulling the titles either from content_name or menu_text. Why MLE does not uses these columns as well puzzles me.
These fields are not assigned to any language. Maybe it is good idea to apply all default language operations to monolingual fields.
gdur
Forum Members
Forum Members
Posts: 142
Joined: Sun Jan 10, 2010 10:59 am

Re: Module Statistic 1.0 rc2

Post by gdur »

Hi Peciura,

Sorry but I don't understand this answer. Which fields are not assigned to any language? How to apply all default language operations to monolingual fields? Where can I find this option? Did I miss something somewhere?
Peciura

Re: Module Statistic 1.0 rc2

Post by Peciura »

gdur: 'content_name', 'menu_text' are left from regular CMSms. CMSms-mle-fork uses DB columns appended with language specific  DB block like 'en', 'fr' and so on.
ATM your fix to Statistics module is the quickest way to solve compatibility issues with CMSms-mle-fork.
gdur
Forum Members
Forum Members
Posts: 142
Joined: Sun Jan 10, 2010 10:59 am

Re: Module Statistic 1.0 rc2

Post by gdur »

Hi Peciura,

Good to hear you agree that this is the fastest fix for the time being. But that still does not answer the questions I had with regards to your previous post...

Do I understand right that the non lang related columns should not be there and this is a (wrong) left over of a previous standard install?
alby

Re: Module Statistic 1.0 rc2

Post by alby »

In this old topic there is the correct patch for Statistic.
I don't think that is more different in new module release (maybe for other row number)...

Alby
Last edited by alby on Tue Jun 01, 2010 7:16 am, edited 1 time in total.
Peciura

Re: Module Statistic 1.0 rc2

Post by Peciura »

...non lang related columns should not be there and this is a (wrong) left over of a previous standard install?
CMSms-mle-fork is to be kept as close to regular CMsms as possible. So keep those columns where they are. In fact they are used to import original (monolingual) content to CMSms-mle-fork.
gdur
Forum Members
Forum Members
Posts: 142
Joined: Sun Jan 10, 2010 10:59 am

Re: Module Statistic 1.0 rc2

Post by gdur »

Hi Peciura,

So not a left over but only in use while importing content from a non MLE version, right?

It puzzles me still a bit. From what I remember from the time I was setting up MLE I had trouble in selecting the default language. I've got it somehow to work and didn't pay attention anymore but now I remember that right after converting to MLE I lost all the page titles and had to redo them again. Wasn't a big thing though because it was in a early stage. Somehow I had the impression that once a page is not translated (thus empty) MLE rolls back to the default language and grabs the data from these standard columns.
Peciura

Re: Module Statistic 1.0 rc2

Post by Peciura »

Default language is one of new languages you had set, the one with active radio on 'Site Admin » Global Settings > MLE languages'

When adding the first mle language make sure 'Default language for the frontend' on 'Site Admin » Global Settings > General Settings' is not the same you intend to set. So if regular content is in French, temporary set 'Default language for the frontend' to English and than you can create French mle language and import content. Then set all other languages.
gdur
Forum Members
Forum Members
Posts: 142
Joined: Sun Jan 10, 2010 10:59 am

Re: Module Statistic 1.0 rc2

Post by gdur »

Aha,

But what if the default language should be English?

It now appears to me that it has been overlooked that English might be the default language while setting up a multi lingual site and that's possibly why I had troubles in finding my way around. I must admit I would need to do a fresh install to go through this all again but I am pretty sure that this bit is not consistant.
Just for my understanding. Is the meaning that whatever the default choosen language is that this language is populating the standard default fields? And that the additional languages are added to the table? In my case, I wanted English as the default language added with a bunch of others. Nevertheless I find colums with the _en extension leaving the original fields as phantom fields(???).
Locked

Return to “[locked] CMSMS MLE fork”