WNYDUG Virtual Meetup: Wednesday, 02/11/2015, 7 p.m. . . .

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
jpw1116's picture
Start: 
2015-02-11 19:00 - 21:00 America/New_York
Organizers: 
Event type: 
Online meeting (eg. IRC meeting)

Welcome to the Western New York State Drupal User Group’s monthly Google+ Hangout.

We will meet online and cover user-provided topics.

Newbies, just join in when you can, here at the Hangout, starting at 7 p.m. A headset/mic gives the best results. Learn more at http://www.google.com/+/learnmore/hangouts/

As always, WNYDUG members and others are welcome to bring in Drupal questions, finds, and ideas.

Official website: http://groups.drupal.org/western-new-york

BTW, check out our mailing list signup link: http://wnydug.net

The URL to join the Hangout is http://goo.gl/k0A96l

Comments

The WNYDUG online hangout is TONIGHT (02/11). . . .

This just in. . . .

jpw1116's picture

Cornell University is proud to announce their second DrupalCamp on Friday April 24.

New this year half day event on April 23, Tooling up for Drupal development, collaboration, and contribution. Cornell’s DrupalCamp 2015 will be held in the ILR Conference Center and will include a keynote speaker, a variety of sessions for all levels of Drupal users, poster sessions and many networking opportunities. This event is open to Cornell, surrounding colleges and the public.

Read more at https://groups.drupal.org/node/456843.

New webform does not behave like existing ones

cmcnelly's picture

Hi, I apologize if this topic has already been addressed. We are using Drupal 7. We have two webforms and I needed to create another. We could not get the Clone to work for the form even after following all the suggestions here:
https://www.drupal.org/node/1161924

All we got was the ability to clone each individual field of the webform, not the whole thing.

So I decided to just create a new Webform using Add Content. I set it up EXACTLY like the existing one as far as I can tell but it does not look the same and I don't know where to look to figure out why the new one is taking up the whole page.
Here is the URL for the "old" form that looks right:
http://www.micmod.com/boiler-control-system-quote-request

and here is the URL for the new one that seems to be an amoeba:
http://www.micmod.com/biomass-boiler-quote-request

any help greatly appreciated! I apologize for not being able to attend the meetup and bring it up there.

Webform problem

DCanfield's picture

Hi there
I had a chance today to look at your form issue and found the source of the problem, what I'm not sure about is how to fix it on your end.

I saved the source code from each of the pages and used Notepad++ to compare them (there is a compare plugin available for Notepad++, been using it for years, very handy in a case like this). On the form that fails you're missing a div tag that is causing your formatting problem.

Unfortunately this forum doesn't allow me to paste a screen print, but I'll walk you through it. You'll need Firefox with the Firebug plugin, if you don't already have it.

  • Open the failing page if Firefox, right click somewhere near your breadcrumb line above the form and select "Inspect element with Firebug" from the bottom of the pop-up menu.
  • Click on the div tag with the class "region region-content" that is immediately under div tag with the class "breadcrumb" to highlight that line in the Firebug html console that will open at the bottom of the page
  • Right click, and select "Edit html" from the pop-up menu
  • Immediately above the tag "region region-content" type in the following new div tag:
    146 <div id="content"> <-- TYPE THIS INTO THE FIREBUG HTML EDIT SECTION
    147 <div class="region region-content">
    148    <div id="block-system-main" class="block block-system">
    149
    150
    151  <div class="content">
    152    <div id="node-218" class="node node-webform clearfix" about="http://www.micmod.com/biomass-boiler-quote-request" typeof="sioc:Item foaf:Document">

As soon as you've typed that in you should see the page fall in line. Now, the real problem is going to be figuring out why that content id div is missing. That might be tougher to find, and I'm not sure how much customizing you've done to the template files you're using.

I hope this helps you get started, anyway. Let us know how you make out.

Webform problem

cmcnelly's picture

Hi, thanks for the response. Now trying to figure out where this happens, because every new webform I want to create is going to have the same problem. Unfortunately this site was handed over to us by a 3rd party agency so as far as template files go we are poking in the dark a bit. The site was originally done in Drupal 6. I think forms we've added since going to Drupal 7, are showing this "new" behavior.

I notice that the webforms that are working properly each have a php file with this type of name: page--node--162.tpl.php where "162" is replaced in each filename with the node number of the form page (the node number I see in the URL when I'm in Edit mode). I believe these php files control the appearance of the form because there is a (div id=content) although the code within that tag is (?php print render($page['content']); ?) -- note the first and last parentheses here are the tag brackets

But, we copied one of them and renamed it so the "162" was the node name of the new form...and it didnt' seem to make any difference. Maybe you can't just create a copy of the php file and rename it, inserting the new node name?

Or am I barking up the wrong tree..?

I very much appreciate your help!

webform problem - more info

cmcnelly's picture

So I just found another file called "page.tpl.php" and the code is almost identical to the ones named "page--node--162.tpl.php" (again, "162" being the node number of the form).
But there is definitely something missing from page.tpl.php that is in the other files.
Its code is:

<?php
print render($page['sidebar_first']);
?>

<?php
print $breadcrumb; print render($tabs);
?>

<?php
print render($page['content']);
?>

While the working forms' files have this:

<?php
print render($page['sidebar_first']);
?>

<?php
print $breadcrumb; print render($tabs);
?>

<?php
print render($page['content']);
?>

I'm wondering if, when I created the new webform it's pointing at page.tpl.php which is missing some code the other files have...?

Ummm....

DCanfield's picture

Hi Carol
OK, not sure what I'm missing, but I can't see any difference between the two sections of code blocks you entered. Can you point out the difference?

The answer to your final question is yes, if there is not specific template file for that specific page it should use the default page.tpl.php file, as long as they haven't tweaked something somewhere else.

I think the real question here is why they would have created custom template files for each of the forms. That's a whole lot of extra work and complexity that I think most people would want to avoid unless absolutely necessary.

How many forms do you have? Are they substantially different, where you want to have a different appearance for each (or some) of them?

If the answer to the first question is more than one, and the answer to the second question is no, then I think you would want to try to get page.tpl.php to format correctly. If that won't work for some reason maybe you could create a custom template for just the forms, that all of the forms would use so you only have 1 extra template file to maintain. You can then lose the custom templates pointing to the individual form pages and move on to more interesting problems.

Hope that helps, I could be missing something really obvious, and always remember that free advise can be worth just what it cost :)

David

Webform problem

cmcnelly's picture

Hi David,
thanks much for your help. I have no idea why separate template files were created for each form; the website was initially developed for us by an ad agency (who shall remain un-named) and then handed over to us with very little explanation and no training. We have run into quite a few "why did they do that??" since then.
My colleague and I took a Drupal intro course at Microknowledge in Albany that was great, but everything else has been learned by reading and by poking around in our sandbox, with some assistance from awesomely helpful Nick Garofalo at WebOzy.

I think there is a div id=content in the individual files that is not in the page.tpl.php file.

At this point the basic appearance of all our forms is essentially the same, it's just the fieldsets, types of fields and options in the fields that change. So, I will try adding the div to page.tpl.php in our sandbox and see what happens.

If we're still stumped, you're right, we will probably have to move from cheerfully given free advice to cheerfully given paid assistance :)

Thanks!
Carol

Infected modules from Drupal site?

cmcnelly's picture

Hello
A couple weeks ago our site got infected with a virus. Our administrator cleaned it all up and everything was fine.
Yesterday he updated three modules: Webform, Filters and Toolbar.

Right after updating these modules the infections appeared again. So we wanted to let someone know, since it looks like they came from the drupal.org site.

The infected files have the same timestamp as the other files in the module directory.
The files all appear to contain binary data within their php text.

Scan results from Linux Malware Detect v1.4.2
{HEX}php.base64.v23au.184 : /var/www/html/micmod.com/modules/filter/css80.php

{HEX}php.base64.v23au.184 : /var/www/html/micmod.com/modules/toolbar/.view32.php

{HEX}php.base64.v23au.184 : /var/www/html/micmod.com/sites/default/files/webform/object.php

If there's someplace else I should post this please let me know.
Carol.

WNYDUG

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week