Issue with overwriting modules on theme

Hey, guys,

I’m currently migrating a project for a client and I’m having some issues with overwriting some modules with my theme.

The website was developed in a Linux server, and works ok as it is. But the client server is an Windows ISS server, and after I migrated the website, the Builder works ok, but the custom modules aren’t showing, in fact, the modules settings are the ones that I set at the modules on my theme, but the frontend is from the default module. For example, I can set all the necessary settings on the button module, but the frontend code showed is still the default button.

If you guys can check it, I’ll be glad to give access to both the dev and production sites.

Thanks!

Ugh! Sorry about that Diego. If you can shoot us the login info for the two sites, we’ll definitely take a look. My limited experience with ISS servers has been nightmarish =/ There’s usually all sorts of oddities and quirks that make things really cumbersome to debug. We’ll do our best, though!

[Content Hidden]

Hi, guys,

Sorry to bother, but any luck on this?

Sorry for the pressure, but since the issue is happening on the production site, I’m needing a fix or at least a position to know what will be my next step.

Let me know if you guys need any other info or help!

Thanks!

Hey Diego! We didn’t a chance to dig into this yesterday, but I’ll get on it right now. I’ll keep you in the loop if we need more info.

Diego, I know this is a live site, but would it be possible for us to get FTP access? I am afraid that there won’t be much we can debug from the WP admin.

Also, is WP Debug on? I tried opening the BB test page on the live site and I only got a bunch of PHP notices/errors. Just curious if it’s on or no?

Thanks!

Hey Diego,

I took a quick look around and we’ll definitely need FTP access to fix this one. Would it be possible to duplicate the site into a subdirectory on the Windows server so we can hack around? I have a feeling this is a nasty issue related to some sort of PHP inconsistency on Windows servers.

Let me know.

Justin

Hey, guys, sorry for the delay!

Robby, at the production site I didn’t turned on WP_DEBUG. I can do it if you guys need to.

Justin, about the duplicated website, of course I can, but I’ll need a couple of hours to do that. Unfortunately, the client has a pretty crappy web server with a really bad custom admin area that needs an hour to setup a MySQL database and 30 minutes to setup a subdomain. Yeah, feel my pain, I cry in a dark corner every time I had to deal with it!

When I have the duplicated website online, I’ll let you guys know. As for now, I’ll post here the data for the FTP access, and meanwhile you guys can check it out if you want.

Thanks for the help!

[Content Hidden]

Thanks, Diego. I’ll start poking around now and let you know if I find anything in my initial tests.

Justin

Hey Diego,

Hold off on duplicating the site. Fingers crossed that I found the issue. I’m doing so more testing now.

Justin

Hey Diego,

Problem solved! The issue was with how we were handling custom module directory paths. Windows use of backslashes in paths was throwing that off.

Once I fixed that I was getting another error that was related to your custom button module. Here’s the code in question…

<?php 
	$mod_class = isset( $module->get_classname() ) ? $module->get_classname() : '';
	$link = isset( $settings->link ) ? $settings->link : '';
	$link_target = isset( $settings->link_target ) ? $settings->link_target : '';
	$btn_class = isset( $module->get_btn_classes() ) ? $module->get_btn_classes() : '';
	$text = isset( $settings->text ) ? $settings->text : '';
 ?>

The issue with that code is that you’re calling isset on a function return value…

$mod_class = isset( $module->get_classname() ) ? $module->get_classname() : '';

Instead you should be getting the value first and then checking like this…

$classname = $module->get_classname();
	$mod_class = isset( $classname ) ? $classname : '';

I fixed that for you because that error was taking down the site.

Let me know if you run into anything else.

Justin

Hi, Justin,

Thanks! Now it’s everything working ok! And thanks for this fix at my code, didn’t notice that!

Now I can cry a little less, thanks to you guys!

You’re welcome, Diego! You gotta get them on a better server! :slight_smile:

Justin