hi, when I go to: /admin/content/webform/mysql, I expected to see my existing webforms that I could generate MySQL views for but nothing is there. I am using Webform 3.6 also. Any indication of what I might be doing wrong? Thanks.

CommentFileSizeAuthor
#12 1038532-show-webforms.patch2.01 KBcafuego

Comments

danny englander’s picture

Title: Do not see "Select webforms you would like to generate MYSQL views for" » Do not see exisitng webforms under /admin/content/webform/mysql
usonian’s picture

Title: Do not see exisitng webforms under /admin/content/webform/mysql » Do not see exisitng webforms under /admin/content/webform/mysql (Webform 3.x)
Assigned: Unassigned » usonian
Category: support » bug
wjackson’s picture

Highrockmedia, did you ever find a solution? I appear to be having a similar issue. I have reviewed the documentation as well as watched a screencast by NodeOne, but I still can't seem to get any webforms to display at /admin/content/webform/mysql

danny englander’s picture

@ will.j -- No I didn't, I let it sit for now, I needed to move on and do other things. It was not a must have for the site I am developing but would have been nice.

wjackson’s picture

Highrock, thanks for the response! It's too bad to hear that you didn't get it resolved. This feature, or at least something close to it, is a definite need for a site that I am currently developing. If I can make any progress with the matter, I will post my findings.

diaxpro’s picture

Hi have the same issue, drupal 6.2 and webform 3.6, i'm creating a new tab in results page with a filter by user name and date submission. When finish i put link here.

theoracleprodigy’s picture

I wonder if this has to do with the array of databases. I had to add a patch to all my installs and have the same exact issue.

theoracleprodigy’s picture

Actually I found that if you have multiple document types enabled this will not work. If you only have webforms enabled it seems to work just fine. The issue was on line 191 of webform_mysql_views.module. When it creates the query it is escaping the list with \',\.

Hope someone can fix the line as I am not sure how to.

usonian’s picture

Thanks for digging into this sandy.girl - I'll try and take a look soon.

kifwebe’s picture

I dropped this code in at that location to make a temporary fix for my testing site... I don't pretend this is the best way to do it, but at least I can experiment with webforms_mysql_views until a proper fix is out. (I was a little worried about a sql injection using a user named content type...)

//Get list of all webform nodes
// $query = db_rewrite_sql("SELECT nid, title FROM {node} n WHERE type IN ('%s') AND status = 1 ORDER BY nid");
// $result = db_query($query, "'".implode("','", $types)."'");
$query = "SELECT nid, title FROM {node} n WHERE type IN (";
$tt="";
foreach ($types as $t) {
if ($tt!="") {
$tt.=",";
}
$tt.="'".($t)."'";
}
$query.=$tt.") AND status = 1 ORDER BY nid";
$query=db_rewrite_sql($query);
$result = db_query($query);

seschneck’s picture

The fix in #10 worked for me as well, thank you kifwebe.

cafuego’s picture

Status: Active » Needs review
StatusFileSize
new2.01 KB

The attached patch properly creates placeholders for the query, which allows it to safely use multiple webform node types.

Additionally, this patch removes the requirement for webforms to be published before they're listed and it also shows the node nid and node type in the listing.

wickwood’s picture

Thanks Cafuego!

Patch works great for me. Thanks for fixing this!

Now I just need to figure out how to get the module to use something other than the node title to create the MySQL View Name.

Steve

danny englander’s picture

Status: Needs review » Needs work

I am revisiting this module several months after I opened this issue and I tried both the patch (#12) and the code in #10 above but neither worked.

I did have more then one content type set to use webform but even reverting back to just webform does not work either, when I visit /admin/content/webform/mysql, still no joy.

It would be great to get this working. I am a site builder / themer so unfortunately I can't really help out with sorting through the code and what the issue is but I am willing to sponsor getting this fixed.

Changing status to needs work.

gvdvenis’s picture

Priority: Normal » Critical

Is there any progress on this issue. Wouldn't it be possible to wrap up some of the available patches in a dev release? This would make my life and that of a few others a lot easier. I changed the issue status to critical, because it really is. Without this issue solved this module is unusable.

cafuego’s picture

Well, attached patch works for me, so without any additonal info about why it might not work for others, there's a not a lot I can do :-/

gvdvenis’s picture

Priority: Critical » Major

Well, i couldn't apply the patch using my favourite IDE: Netbeans. It complained about some wrong context. So i then applied the patch by hand and guess what... it worked! Would be nice however if this patch got applied to the downloadable version of this module.

cafuego’s picture

Status: Needs work » Needs review

So considering it works for gvdenis and there's no information about how it does NOT work for highrockmedia, I'm setting this back to 'needs review'.

HaloDigitalDesign’s picture

#10 worked, thanks!

alby111’s picture

looking for safer a permanent solution, suggestions welcome

cafuego’s picture

Apply the patch and test it, so we can ask the module maintainer to apply it.

rmyoung’s picture

Status: Needs review » Reviewed & tested by the community

Patch at #12 applied and tested- works fine.

rjl’s picture

Patch at #12 works great - and is safe.

Re: At #20 "looking for safer a permanent solution, suggestions welcome"
The patch at #12 is a safe solution, as opposed to the code chunk at #10, which is not safe. If your comment referred to #10, please take a look at the patch in #12. If your comment was in regards to the patch at #12, what is the safety concern you see in that code?

cafuego’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Patch from comment #20 ported to the latest git version and applied to 6.x-1.x-dev.

cafuego’s picture

Assigned: usonian » cafuego