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.

Comments

TheDarkFlop’s picture

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;
}

TheDarkFlop’s picture

Priority: Normal » Critical
TheDarkFlop’s picture

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.

apt94jesse’s picture

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?

budda’s picture

Assigned: Unassigned » 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.

monstordh’s picture

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

ricky7524’s picture

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

budda’s picture

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

budda’s picture

ricky7524’s picture

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

budda’s picture

Status: Fixed » Closed (fixed)

This issue was about a PHP4 error. Not SQL.