To avoid "Warning: Parameter x is not known by module y" - CMSMS up to v.1.6.0

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Post by tyman00 »

That is understandable. We are just hoping that if it really is still a bug we can get it fixed before 1.6.1 is released.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
vilkis

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Post by vilkis »

Three more man hours of testing have proved that this issue is solved in 1.6... by myself, and two other dev team members on seperate installs.
There is no difference how much time is spent on testing. It depends on if you understand a problem or not. If you do not do that all module calls are counted in a content - it will be buggy. That's all.

Now -  to reproduce a bug use a template:

Code: Select all

{process_pagedata}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
{* Change lang="en" to the language of your site *}

<head>

<title>{sitename} - {title}</title>
{* The sitename is changed in Site Admin/Global settings. {title} is the name of each page *}

{metadata}
{* Don't remove this! Metadata is entered in Site Admin/Global settings. *}

{stylesheet}
{* This is how all the stylesheets attached to this template are linked to *}

</head>

</__body>
  {* Start Content *}
      <div style="float: left; width: 70%;">
         <h2>{title}</h2>
         {content} 
      </div>
      {* End Content *}
<div>

<div>
    {cms_module module=FrontEndUsers}
</div>
<div>
    {cms_module module=News}
</div>

</div>
<__body>
</__html>
How to reproduce:

click on Title of news - CMSMS goes to noninline mode- then try to login to frontendusers. No success on first try?


Ok - now, how to test without spending a lot time.

Insert

Code: Select all

var_dump($id);
in file class.module.inc.php in function DoActionBase :

Code: Select all

function DoActionBase($name, $id, $params, $returnid='')
	{
              var_dump($id);
and see how module ids change before and after click on News title.

And lastly, apply my patch and you will see that all work well.

Regards,

vilkis
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Post by tyman00 »

vilkis wrote:
Three more man hours of testing have proved that this issue is solved in 1.6... by myself, and two other dev team members on seperate installs.
There is no difference how much time is spent on testing. It depends on if you understand a problem or not. If you do not do that all module calls are counted in a content - it will be buggy. That's all.
Better bug reports and examples save us time trying to replicate, confirm and fix the issue. We were unable to replicate this issue because we had no idea how you were getting there. Now that you provided a simple, easy to follow guide without a bunch of links to other posts/topics to replicate the issue we can actually proceed without wasting our time.

I was able to replicate the issue now because of the proper report and examples.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
vilkis

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS 1.5.4

Post by vilkis »

tyman00 wrote: We were unable to replicate this issue because we had no idea how you were getting there.
I do not agree with you - it is not true - my previous report was clear enough. Moreover, I have supplied a solution.
vilkis
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS up to v.1.6.0

Post by tyman00 »

In none of your past reports do I recall an explanation even remotely close to what you recently posted. It was especially difficult to follow since we had to go between over a half a dozen posts and bug reports. There was no centralized explanation, just bits and pieces here and there.

I am not sure exactly why your patches were not implemented, but it could have been that it fixed the problem above but did not take the whole API into consideration and could have caused more problems than it solved either now or in the future.

Can you please indicate if you have tested this with both pretty_urls turned on and turned off?
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
vilkis

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS up to v.1.6.0

Post by vilkis »

I tested it with pretty url, only. But it does not depend on it.
vilkis
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS up to v.1.6.0

Post by tyman00 »

The reason I asked is because I can duplicate the issue with Pretty URLS on but cannot replicate it with them turned off. So it could very much be relevant.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
vilkis

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS up to v.1.6.0

Post by vilkis »

I reproduced it without pretty urls.
vilkis

Remember my hint: There is no difference how much time is spent on testing. It depends on if you understand a problem or not. If you do not do that all module calls are counted in a content - it will be buggy. That's all.
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS up to v.1.6.0

Post by tyman00 »

Right forget that we are trying to make sure what is really causing the problem. Why would we want to spend time making sure there is nothing else that could be causing the problem. If you want us to help you you need to help us and humor us. If we threw every last bit of code into the core that was posted on the forum without testing and confirming the issue CMSMS would be train wreck that no one would be able to use anymore.

I am trying to help you out here, I gave you the benefit of the doubt. Don't aggravate me or you won't have anyone standing on your side.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
vilkis

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS up to v.1.6.0

Post by vilkis »

You fell to more power. We call it as disease of the stars in our country. It becomes offtopic. I just posted my trick.
vilkis
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS up to v.1.6.0

Post by tyman00 »

Well then I apologize for trying to help you out and actually thinking you might be on to something. I was able to replicate it in both situations and have actually reported my findings back to the dev team.

I didn't fall to more power that is an insult to me. I am smarter than that and I know that I can't just expect to come in and post a bit of code and expect every one to fall to their knees before me because I provided a solution that may have not taken everyone's needs and the whole community into consideration.

We also have a saying. "Don't shoot the messenger" and "Don't piss off the help".  You pretty much did both. I was trying to be a good mediator between you and the dev team. I got you results because now the dev team is actually going to look into the issue, but you managed to insult me and treat me like crap. So you are very welcome for the results, but beware that I am done wasting my time for your needs.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
vilkis

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS up to v.1.6.0

Post by vilkis »

I'm wasting my time, too.  :o
I do not understand the concept "we and you". We all are the community.
vilkis
alby

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS up to v.1.6.0

Post by alby »

Sorry, Vilkis I don't agree with that.

I saw this sometimes but long time ago only.
Yesterday, I was one of three who has look to http://dev.cmsmadesimple.org/bug/view/3138 and tried the case (a) and (b) on 1.6 and everything worked as expected (I don't like Printing module behavior but it's not a bug ...).

Without a case on which see the behavior is somewhat difficult (you must analyze all code flow!). I think you have done the fix because you've seen a given behavior and not because you looked at the code.
Now that you've provided an example that we have reproduced we can take a look at what does not work.

You say, I've done a fix and need apply only. I would say that is a workaround:  there is a problem, we put a variable and go.

IMHO 1: I don't like a smarty variable ("presentation" variable) condition in a "logical" code part
IMHO 2: My question is: why this happen? It could be a bigger problem that the variable only could not cover in all conditions, for example (I don't know) what happen with content_type module?

Today is a bad day but if I have sometime later I will try to look in depth ....

Alby
Last edited by alby on Wed Jun 24, 2009 7:43 am, edited 1 time in total.
vilkis

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS up to v.1.6.0

Post by vilkis »

The problem is very clear for me now:
A content plugin does not process content if one of modules goes to noninline mode. If content is not processed then system does not count module calls in content and assigns too small ids to modules that stand after {content}  tag if there are module calls in content.

vilkis
vilkis

Re: To avoid "Warning: Parameter x is not known by module y" - CMSMS up to v.1.6.0

Post by vilkis »

the algorithm could be as follows:
if( $id != 'cntnt01' )
{
  process content
}
else
{
    count module calls in content
    process module with id=cntnt01
}

My solution is to try "count module calls in content". It is not elegant but it seems it is on the right way. The problem is that I do not understand how Smarty works and this solution is one that I found after many hours analyzing code flow with xdebug.

vilkis
Locked

Return to “Tips and Tricks”