For some reason when I use the paypal module with the ad content type, It doesn't
let paypal module take over and ask for payment. It just goes right ahead and submits it.

I believe this is the advertisement modules problem. Though I am not entirely sure.
It works with all the other content types like story and page, but not with advertisement.
I think this is because the ad module has a custom secondary page that proceeds submitting
the add.

Side note: I am specificly using it to post image ads, so I havent tried with posting any other types
of ads.

Anyone have any ideas?

Thanks so much!

Drupal 5.5
Advertisement Module
Paypal Node Module

CommentFileSizeAuthor
#11 ad_taxonomy.patch970 bytesjeremy

Comments

TheDarkFlop’s picture

Version: 5.x-1.4 » 5.x-1.4-1
jeremy’s picture

I've not actually used the paypal module myself, so no idea what's going wrong. You're likely correct that it's due to the way that adding ad nodes is a two stepped process. In any case, it seems like this is a better fit as a bug against the paypal module?

jeremy’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

As the paypal module is not required to us the ad module, I'm bumping the priority down to normal.

TheDarkFlop’s picture

Priority: Normal » Minor
Status: Postponed (maintainer needs more info) » Active

Yea thats a good point.
I will close this up.
Though Would you be able to give me any guidance in what the advertisment module does between submitting
and going to the 2nd page of the module?

I believe if I can figure out what the heck is going on after I hit that submit button I can debug it,
to where the modules cross paths.

I made this a forum post.
http://drupal.org/node/216131

-thedarkflop

TheDarkFlop’s picture

*** Update ***

I have some more info on this issue.
And some questions

Here is what the "story" type shows when you look at node->taxonomy when its published.

    [taxonomy] => Array
        (
            [2] => stdClass Object
                (
                    [tid] => 2
                    [vid] => 1
                    [name] => Serious
                    [description] => 
                    [weight] => 0
                )

        )

With advertisement type you get this:

    [taxonomy] => Array
        (
        )

Paypalnode searches through the taxonomy to find matches to term that costs.
Though the taxonomy seams to be non existent here.

summit’s picture

Category: support » bug
Priority: Minor » Normal

Hi,

I think I have a related issue. I think when you are correct, the ad.module doesn't comply completely with what other modules expect related to taxonomy.
You are referring to the paypal module. In my situation I have problems using the cck_taxonomy_ssu module. This module grabs the taxonomy checked by the ad.module, but it seems the taxonomy is not correct handled as you described above TDF http://drupal.org/comment/reply/216862/722840#comment-722840

The normal Story-node works correctly with the cck_taxonomy_ssu module, but the Ad_text or Ad_Image module terms which are checked are not shown on first time node-edit.
May be because of the same as your finding above TDF.

EDIT: On http://drupal.org/files/issues/content_taxonomy-tax-assoc-1.patch I found a patch which deals with taxonomy selection on edit-node screen. Jeremy, may be the code is handy and can be tweaked for ad.module?

function content_taxonomy_nodeapi(&$node, $op) {
  if ($op != 'submit') return;
  $tv = content_taxonomy_taxvals((int) $node->nid);
  if (isset($tv)) {
    if (isset($node->taxonomy)) {
      foreach ($tv as $vid => $tids) {
        $node->taxonomy[$vid] = $tids;
      }
    }
    else {
      $node->taxonomy = $tv;
    }
  }
}

I alter the priority to normal and alter to bugreport, because I think the ad.module should behave the same as other nodes should in relation to other modules. Off course with the assumption that TDF his findings are correct. Otherwise sorry for the altering Jeremy.

Thank you in advance to go into this!
Greetings, Martijn

jeremy’s picture

Assigned: Unassigned » jeremy

Assigning to myself, to remind myself to look into this before another release.

summit’s picture

Thanks Jeremy, looking forward to test for you!
Greetings,
Martijn

giggler’s picture

As an interim solution. This seem to be working at least to redirect to paypal and it does submit the ad. It does change the ad.module code, so if someone knows how to put this code in an external file rather than in the module itself, it will be better in case there are updates:

http://drupal.org/node/216131#comment-733680

summit’s picture

Hi,
Great paypal guys are ok temporarily!
Made a clean issue related taxonomy; http://drupal.org/node/216862#comment-726640. The issue is: http://drupal.org/node/226576 to try to get a clean issuelog for you. Sorry to respond to the paypal issue with my own issue-thing, so made a new one.

Greetings,
Martijn

jeremy’s picture

Component: ad_image module » ad module
Status: Active » Needs review
StatusFileSize
new970 bytes

I'm not really sure the goal here, nor am I sure what's expected from the ad module. I looked at the patch that's included above, but there's not really enough context to fully understand what it's doing or why.

In any case, I've created the attached patch which does what it seems is being asked for. Please test.

summit’s picture

Hi Jeremy,

I got following user warning:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNERT JOIN term_data d ON n.tid = d.tid WHERE nid = 0' at line 1 query: SELECT n.tid, d.vid FROM term_node n INNERT JOIN term_data d ON n.tid = d.tid WHERE nid = 0 in /home/public_html/includes/database.mysql.inc on line 172.

EDIT: It should of course be Inner JOIN.
I changed the patch, and no user warning, but it is not working.
But no problem, the module for which this patch is needed is not good enough maintained. I will change modules and file a new issue if I still need this functionality, ok?
Thanks for the patch though!
Greetings,
Martijn

jeremy’s picture

Status: Needs review » Postponed (maintainer needs more info)

This issue seems to affect other people with other modules, too. So I'd really like to fully understand the problem. We'll leave this open for now, in the hopes that someone can fill in the blanks and explain to me what needs to happen.

summit’s picture

Hi Jeremy,

What the problem is in my perspective.
After tagging some terms on the advertisement nodetype and hit [Submit], the tagged terms are not saved correctly as other nodetypes using taxonomy terms.
So the first time a created node with tagged terms needs to be updated the checked terms are not selected anymore and need to be selected again. Curious enough the second time the tagged terms stay connected to the node.
But off course it is undoable to repeat this procedure twice for every ad node.
This is my situation using the cck_taxonomy_ssu module to select terms. Other nodetypes do not have this behaviour so thats why I could pinpoint it as a advertisement-taxonomy issue.

Is this enough explanation of the current situation?
Greetings,
Martijn

jeremy’s picture

I've not been able to duplicate what you describe (without the patch I attached earlier) -- if I assign terms to an ad when I create it, they are properly saved into the database the first time. Are you suggesting this never works for you?

summit’s picture

Using the cck_taxonomy_ssu module, no it never worked for me. And I saw again the output as described here: http://drupal.org/comment/reply/216862/818425#comment-722840. SO I think not filling correctly the taxonomy Array is the problem, right?
Thanks for going into this!
greetings,
Martijn

jeremy’s picture

I've been unable to duplicate any problems with this. If you provide step by step instructions on how to duplicate your problem, perhaps I can track this down.

summit’s picture

Hi Jeremy,

I am on holiday now. I am also using the hierarchical select module now because I need the ajax-support in Nepal.
If I see any problem also with this module, I report back.
thanks for trying to get this working.
greetings,
Martijn

jeremy’s picture

Status: Postponed (maintainer needs more info) » Fixed

No further updates, closing.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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