Paypal node install error

TheDarkFlop - January 10, 2008 - 14:08
Project:PayPal Node
Version:5.x-1.2
Component:Code
Category:bug report
Priority:critical
Assigned:budda
Status:closed
Description

I have an odd error going on

foreach ($vocabs as $i => $v) { // these will be used for column headers
$vocab_headers[$v] = taxonomy_get_vocabulary($v)->name;
}

The bold part in this piece of code is causing the site to completely not load. and show a white page, an error is not even given.
If I remove the part in bold everything works fine.

#1

TheDarkFlop - January 10, 2008 - 18:31
Title:Node Promo Code - Screen Goes white for no reason» Paypal node install error

I have nailed it down to the paypalnode.install file on line 99

foreach ($vocabs as $i => $v) {
$vocab_headers[$v] = taxonomy_get_vocabulary($v)->name;
}

#2

TheDarkFlop - January 10, 2008 - 18:32
Priority:normal» critical

#3

TheDarkFlop - January 11, 2008 - 19:43
Status:active» needs review

Search for all instances of this line in the paypalnode folder files.

$vocab_headers[$v] = taxonomy_get_vocabulary($v)->name;

and replace with this:

    $vocabulary = taxonomy_get_vocabulary($v);
if($vocabulary)
$vocab_headers[$v] = $vocabulary->name;

It will fix the error.
This needs code still needs final review.

#4

apt94jesse - January 16, 2008 - 21:19

I had the same exact problem, except it was giving me an error and not just a blank white page.

Your fix helped and got me up and running, but now I have sql errors on the content fee pages. Not sure if these are related. Anyone else?

#5

budda - February 9, 2008 - 17:49
Assigned to:Anonymous» budda
Status:needs review» fixed

Error depends on your php.ini settings for displaying errors.

This PHP4 bug has been fixed in latest dev build.

#6

monstordh - February 13, 2008 - 22:32

The SQL errors for me are because the module did not create any tables in the database. They are missing.

#7

ricky7524 - February 21, 2008 - 14:05

sorry, but the problem is not fixed...
i have his error now when i try to put a content fees:

"user warning: Table 'Sql179696_1.paypalnode_prices' doesn't exist query: SELECT * FROM paypalnode_prices WHERE price != 0 ORDER BY pid in /web/htdocs/www.xbass.org/home/includes/database.mysql.inc on line 172."

i've mad every modification in paypalnode.install, ecc and i have already set a taxonomy vocabulary

#8

budda - February 21, 2008 - 19:58

@ricky, if you install the module on a CLEAN Drupal 5.x install can you recreate this missing database problem everytime? I cannot.

#9

budda - February 21, 2008 - 20:00

#10

ricky7524 - February 22, 2008 - 09:53

i find the error...it's in the code of paypalnode.install

CREATE TABLE IF NOT EXISTS {...} doesn't work, you must cancel the {} and it works perfectly

#11

budda - February 29, 2008 - 00:23
Status:fixed» closed

This issue was about a PHP4 error. Not SQL.

 
 

Drupal is a registered trademark of Dries Buytaert.