Expand/collapse not working, local Windows server

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Joe McPlumber
Forum Members
Forum Members
Posts: 14
Joined: Tue May 19, 2009 8:03 pm

Expand/collapse not working, local Windows server

Post by Joe McPlumber »

The expand/collapse function works fine on my production server, but not on my local WampServer. I'm guessing it's because of a PHP setting i don't have enabled, but danged if i can guess which one. The installation reported no problems and neither does System Information. Any ideas?

Thanks,
- Joe
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Expand/collapse not working, local Windows server

Post by jmcgin51 »

how did you implement the expand/collapse functionality?
Joe McPlumber
Forum Members
Forum Members
Posts: 14
Joined: Tue May 19, 2009 8:03 pm

Re: Expand/collapse not working, local Windows server

Post by Joe McPlumber »

With the "Custom drop-down menu" thingy in the WYSWIG. Is there another way, apart from manually typing it?
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Expand/collapse not working, local Windows server

Post by jmcgin51 »

what exactly is the problem?  Do you get an error when the page loads?  Does the expandCollapse title display?  Is it a link as it should be?  What happens when you click it?  If you view your page source, what do you see?

What versions of CMSMS, Apache, MySQL, & PHP?
Joe McPlumber
Forum Members
Forum Members
Posts: 14
Joined: Tue May 19, 2009 8:03 pm

Re: Expand/collapse not working, local Windows server

Post by Joe McPlumber »

Oh, sorry forgot about that stuff.

It's Apache 2.26, PHP 5.2.5, mySQL 4.0.45, WampServer on Windows, CMSMS 1.5.4.

No errors, it makes a link and jumps to the content, it just doesn't expand and collapse.

This is for any website on my local machine. If i upload the whole thing to my production server, the Expand/collapse works as expected with no alterations except paths in the config file. I've thought about just getting used to it but it's annoying to not be able to see what my pages are gonna look like.

Thanks
-Joe
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Expand/collapse not working, local Windows server

Post by jmcgin51 »

this doesn't solve your issue directly, but make a new UDT and use this code:

static $firstExpandCollapse = true;//only gets set one time per page

global $gCms;
$config =& $gCms->GetConfig();

if (!empty($params['id']) && !empty($params['title'])) {
$id = $params['id'];
$title = $params['title'];
}
else {
echo 'Error: The expand/collapse plugin requires that both parameters (id,title) are used.';
return;
}

if ($firstExpandCollapse) {
echo '';
$firstExpandCollapse = false;
}
$url = str_replace('&', '&',  $_SERVER['REQUEST_URI']);
echo ''.$title.'

';
Then call the new UDT instead of {startExpandCollapse}.  The {stopExpandCollapse} tag stays the same.

See if this works better.
Joe McPlumber
Forum Members
Forum Members
Posts: 14
Joined: Tue May 19, 2009 8:03 pm

Re: Expand/collapse not working, local Windows server

Post by Joe McPlumber »

Well that was really stoopit of me.

Using the TinyMCE editor, and the default newline style being a paragraph, and not considering the underlying code, the expand/collapse division tags are likely to be nested in one sort of block or another. Apparently it is tolerant of being nested in paragraphs but not headings, is how i confused myself into thinking it worked on production server and not locally.

That's me, (somewhat) knowing what i'm doing but just not thinking. I can easily see my clients doing exactly the same thing because it seems natural to hit "Enter" to put the opening and closing tags on their own lines, or to put the title of the section in a heading. And none of them want to hear anything about HTML or any other acronyms for that matter.

I'm only coming back to embarrass myself so the next guy doesn't have to. My logic, such as it was, probably thought "well it's a button in a WYSIWYG, so it must work just as it looks to work". Or something like that, it was subconscious. Anyway it seems to me there should be some internal logic to prevent this but offhand i can't think of what it might be.

Thanks for the help, Mr. jmcgin51, and apologies for the unnecessary trouble.

-Joe
Post Reply

Return to “CMSMS Core”