Hi, when I install the module Drupal reports "PayPal Node tables installed". However that's not the case and viewing the Content Fees page gives me the following error:

warning: rsort() expects parameter 1 to be array, string given in /home/thesecr2/public_html/beta/sites/all/modules/paypalnode/paypalnode-admin.inc on line 186.
warning: Invalid argument supplied for foreach() in /home/thesecr2/public_html/beta/sites/all/modules/paypalnode/paypalnode-admin.inc on line 188.
user warning: Table 'thesecr2_olcdrupalb.paypalnode_prices' doesn't exist query: SELECT * FROM paypalnode_prices WHERE price != 0 ORDER BY pid in /home/thesecr2/public_html/beta/includes/database.mysql.inc on line 172.

Please advise

CommentFileSizeAuthor
#5 paypalnode-install.patch1.99 KBnedjo

Comments

apt94jesse’s picture

Exact same problem.

Bump.

apt94jesse’s picture

I have installed the tables manually (through phpmyadmin) and the module seems to work now. It appears to just be a problem with the install file.

budda’s picture

Assigned: Unassigned » budda

The first error:

warning: rsort() expects parameter 1 to be array, string given in /home/thesecr2/public_html/beta/sites/all/modules/paypalnode/paypalnode-admin.inc on line 186.
warning: Invalid argument supplied for foreach() in

is caused by you not setting up any vocabularies that will contain terms that can have a fee associated with them. See the modules settings page. I have added a check for this and a helpful message now.

The second error:

I'm not sure on the cause - i've just run the install on a fresh Drupal 5 site running on a PHP5 and Mysql server. Had no problems.

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

nedjo’s picture

Status: Active » Needs review
StatusFileSize
new1.99 KB

The problem is in paypalnode_install(). This function needs to be updated each time there is a change in the schema. _update_x functions are not run on new installs but only on existing installs that need to be updated (e.g., to a new schema version). The _install function must always create the latest version of the schema.

Here's a quick untested patch.

JLJLJLJL’s picture

Same problem here. No tables created.

budda’s picture

Version: 5.x-1.2 » 5.x-1.x-dev
Status: Needs review » Postponed (maintainer needs more info)

@nedjo
I'm not sure what your patch is supposed to achieve as the .install file already defines all the required tables. See http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/paypalnode/...

wallbay1’s picture

Priority: Normal » Critical

And what are we suppose to do with that patch exactly ?
where do i upload it , in which folder?

nedjo’s picture

Status: Postponed (maintainer needs more info) » Active

Yes, the table creation is not in the 5.x branch. You just need to issue another stable release, as the stable release is not usable for new installs.

Tpainton-1’s picture

Same problem what is the fix here? Great module that seems to have a huge bug.

ashiwebi’s picture

Create the tables manually inside the database.

Tpainton-1’s picture

ok. What a pain.

budda’s picture

Status: Active » Fixed

release 1.3 includes the fixed install file.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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