Hi,

When i tried to select an ad type, nothing happens. It seems to be trying to load something in that split second of selecting an ad type and then nothing happens. This i believe has also cause the status to not function (when i tried to save it as pending or active, or any other status) it fails to save it.

Also thing, when creating an ad, it does not appear under the ad listing page: /admin/content/ad

I have no idea why this is happening? perhaps AHAH is not working (causing it to fail in add/edit settings page) but ad not listed under /admin/content/ad, i have no idea?

Has anyone also experienced this issue? Any pointers will be very helpful thanks.

I'm using Drupal 6.26

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

msellers’s picture

I get the same thing with 6.x-2.4

I select Image Ad, and then go to upload an image file. When I click attache, the page refreshes with no image.

onejam’s picture

I think the real issue here is that the form for 'Select an ad Type' does not appear after selection. This causes it to default to 'pending' status and you cannot update the status to 'active'.

msellers’s picture

I suspect that this issue may relate to the issues submitted on May 15th. Here is the log of changes from the release notes:

May 15th, 2012 (6.x-2.3)
- bug #797274 by tacituseu: apply modified version of tacituseu's patch to get charts to appear
- bug #1252536 by osopolar: fix iframe scrolling options
- Clean up AHAH selection of type
- Require a debug key to show debugging information

I worry that the clean up AHAH selection of type may have inadvertantly broken something. In my experience, "Cleaning" of code often leads to unintentional problems. I will diff the code and see if there is anything obvious.

msellers’s picture

I found that the ad type select pull-down was consolidated with the Select button that was available on previous versions. My theory is that this prevents the reload of the page on selection, and relys on Javascript to update the menu. I don't see any reason for using AHAH in an ad creation page, and prefer not to have core functionality for form operation to require Javascript.

For the time being, I am going to revert to a previous revision as I don't have time to dig deeper into the code for a solution.

John Franklin’s picture

I'm not able to reproduce it on a test VM running Ubuntu 12.04 + PHP 5.3 (5.3.10-1ubuntu3.1, to be precise) + MySQL 5.5 + Drupal 6.26.

I'm assuming you've already tried clearing caches, both browser and Drupal. Is there anything in watchdog log?

John Franklin’s picture

Oh, and which Ad modules do you have enabled?

driftyfluff’s picture

Has anyone else got any idea on this? Since the last update we are having the same problems...

onejam’s picture

Hi,

I'm running:

PHP 5.2.17
mySQL 5.1
Drupal 6.26

I have cleared the cached on both Drupal and browser. Unfortunately, found nothing in the watchdog log.

Ad Modules enabled are:

Ad
Ad actions
Ad click filter
Ad embed
Ad file cache
Ad Owners
Ad report
Ad views
Ad Weight Probability
External Ad
HTML Ad
Image Ad
Text Ad

thanks,

driftyfluff’s picture

I finally added some new HTML ads today by going through the normal process - selecting HTML from ad type (nothing happened at time) went on to publish and save and it went straight back into the same screen but this time the section to input the HTML was showing. So inserted code and saved again. Worked perfectly and ads now created and active :-)

cato’s picture

I can confirm that we have this problem also.
When I select an ad type nothing happens and Chrome reports the following

--------------
Uncaught TypeError: undefined is not a function
onload
o.fn.o.append js_c937ae2ddf41dd033df1bbe95b8df6c3.js:12
o.fn.o.domManip js_c937ae2ddf41dd033df1bbe95b8df6c3.js:12
o.fn.o.append js_c937ae2ddf41dd033df1bbe95b8df6c3.js:12
o.each.o.fn.(anonymous function) js_c937ae2ddf41dd033df1bbe95b8df6c3.js:12
r
--------------
Looking at the script source for the above JS file it's the jquery line - the packed jquery oneliner

Also, I get this error:
"Resource interpreted as Document but transferred with MIME type text/javascript: "http://myhost.mydomain.com/node/add/ad/ahah"."

The contents of this url are "{"status":true,"data":null}" and the mime is text/javascript. Looks like perfectly valid json to me

Tried downgrading to 6.x-2.3 - the error remains
Tried running the 6.x-2.x dev release - error remains

We're running pressflow 6.20, php is PHP 5.2.6-1+lenny16 with Suhosin-Patch 0.9.6.2 (cli) (built: Feb 3 2012 13:17:21)

I remember seeing a similar ahah error before but with imagefield uploads and in that case it was a Memcache related error solved by disabling memcache.
I'm going to try this and report back.

Edit: Nope, disabling memcache didn't fix it.

cato’s picture

In 6.x-2.2 it's actually working so we downgraded.
One thing that strikes me is that in 6.x-2.3 and up the "select" button is removed from the ad type form and the form seems to be auto-submitted with JS. From 6.x-2.3 the ad type form is not working so maybe look into that area?

litzastark’s picture

I'm seeing the same error and I haven't been able to get to the bottom of it. For some reason downgrading to 6.x-2.2 didn't fix the problem for me, though perhaps I need to be more aggressive with clearing caches after downgrading.

From my debugging, it looks like $_POST['adtype_select'] is empty inside ad_form_ahah() - why would this be?

As driftyfluff says in #9, this error doesn't prevent you from creating the ads, but it's confusing and inconvenient to get the error every time!

codeelegance’s picture

For what it's worth:
Downgrading worked for me AFTER I fixed line 211 in the ad_flash.module file (see http://drupal.org/node/821270)
I then got to playing around and simply copied the adtype select from ad => 2.2 to the current version - line 638.
Worked like a charm.
Dunno if this will help anyone, but I thought I would throw it out there.

EDIT: It seems that when using AHAH, the calling element is removed from the form submission: (http://drupal.org/node/1197142#comment-4643222) So that's why the button is still required. Someone with a more in-depth knowledge of AHAH would have to confirm this.

csc4’s picture

I can confirm backing out the change in commit to ad.module in http://drupal.org/commitlog/commit/2482/a8126de81dab1116bf9c049cfbc70833... as mentioned at #13 fixes this for me with Firefox

msellers’s picture

Please refer to the original post in this thread. I know the work-around that some are using, but it is still a bug that should be fixed.

We use a static server for images, so I always use the remote image option, selected on the settings page.

When setting up a new advertismenet, I select "Image ad" from the select ad type pull-down. I observe a little javascript loading icon, but nothing else happens. I cannot enter the remote ad URL as that part of the form does not appear.

I am forced to upload an image and save the ad. Then edit the ad node, and then add the remote URL to the ad image on our static server.

Please help as I want to update to the latest to take advantage of the security fixes.

Thanks!

quadbyte’s picture

Title: Cannot save status and image ad does not appear anymore in edit page » Select type AHAH form doesn't return any answer
Priority: Normal » Major

I can confirm it's not working. It can even get very troublesome if a field is required in the AHAH response, thus preventing to save the ad.

Restoring the Select button fixes it as explained in #13 and #14. Can't submit a patch as I'm running a customized 2.4 version.
But here is the importing hunk to restore in function ad_form(&$node, &$form_state)

    $form['select']['adtype_select'] = array(
      '#type' => 'select',
      '#required' => TRUE,
      '#options' => $adtypes,
      '#default_value' => isset($node->adtype_select) ? $node->adtype_select : '',
    );
    $form['select']['adtype_submit'] = array(
      '#type' => 'submit',
      '#value' => t('Select'),
      '#validate' => array('ad_select_adtype'),
      '#ahah' => array(
        'path' => 'node/add/ad/ahah',
        'wrapper' => 'adtype-ahah-wrapper',
        'effect' => 'slide',
      ),
    );  
fizk’s picture

Version: 6.x-2.4 » 6.x-3.x-dev
Status: Active » Needs review
FileSize
1.07 KB
leelooch’s picture

thank you fizk, your patch works well on firefox, but the problem remains on IE9 witch still wants to download the ahah response.

DamienMcKenna’s picture

FileSize
1.07 KB

The in #17 works, but it needed to be rerolled. Thanks fizk!

DamienMcKenna’s picture

Status: Needs review » Reviewed & tested by the community

As mentioned in #19, fizk's patch worked but just needed to be rerolled, so marking this as RTBC.

fizk’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

leelooch’s picture

Status: Closed (fixed) » Needs work

I'm sorry to reopen the issue
the patch in #19 solves the problem for me on firefox and chrome but not on IE10 which still proposes me to download the json file.