Firstly thanks a lot for making this great module.
I think the problem is am reporting is a bug and all webmasters use Drupal 7 will face it if they install this module.
I installed the Adsense module, All parts of module work fine but only Revenue sharing part doesn't work. I enabled profile module and defined a single-line textfield block for members to define their adsense code and i named this block, profile_google_adsense_client_id
I also made it private. But when i go to revenue sharing basic page in my admin panel, i get a red error page with below content. Please help me to solve this problem.
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database_drpl2.profile_fields' doesn't exist: SELECT fid, title FROM {profile_fields} ORDER BY fid; Array ( ) in revenue_sharing_basic_get_profile_fields() (line 147 of /home/...../sites/all/modules/adsense/old/revenue_sharing_basic/revenue_sharing_basic.admin.inc).
Please help me to fix this problem or write a patch for it.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 1398602-6-adsense-revenue_sharing_port.patch | 3.01 KB | pfrenssen |
| #2 | 1398602-2-adsense-revenue_sharing_table_names.patch | 1.98 KB | pfrenssen |
Comments
Comment #0.0
monil-dupe commentedi changed some names for security reasons/
Comment #0.1
monil-dupe commentedI edited some parameters.
Comment #0.2
monil-dupe commentedI answered the question with more details now.
Comment #1
pfrenssenI quickly checked this. This is probably because the D7 port of the Revenue Sharing module is not complete. In D7 the Profile module has renamed the database tables:
modules/profile/profile.install
So the first step in solving this would be to rename the tables.
Comment #2
pfrenssenHere is a very simple patch that just corrects the table names. This should make the error message "base table not found" error go away, but it will probably be replaced by another error. The code of the Revenue Sharing module still uses the D6 database model.
I have not had the time to test this so feedback is welcome.
Comment #3
monil-dupe commentedThanks a lot pfrenssen for your help. Only in one case in revenue_sharing_basic.module it was needed that i change the code to the new one you said. But after doing that, i get another error which is:
Fatal error: Call to undefined function db_fetch_object() in /home/public_html/sites/all/modules/adsense/old/revenue_sharing_basic/revenue_sharing_basic.admin.inc on line 148
Whats your suggestion for fixing it?
Comment #4
monil-dupe commentedI didn't apply patch yet as i don't know how to do this :) I only changed the php code to the style you said and i got an error on line 145 as i said :(
Comment #5
pfrenssenYes that was to be expected. The module needs to be ported to the new database model in D7. The instructions for this are here: A completely new database API has been added.
The error you are receiving can be solved by following the instructions under "Iterating a result set from db_query()":
Comment #6
pfrenssenLike this :) Patch untested.
Comment #7
monil-dupe commentedThanks a lot for this patch. Unfortunately i can't apply the patch because i don't have the required program for applying patch. You helped a lot for fixing this module.
I faced another problem and it should be moved to Drupal 7 structure but i can't do it even using the guide page you linked. Please have a look at this code and share how to move this Drupal 6 code to Drupal 7 please if you have time:
Comment #8
monil-dupe commentedI changed this line :
$types = node_get_types();To this one:
But it give errors.
Also i changed that to this one too:
$name = node_type_get_name($node);or even to:
$name = node_type_get_name();And i get 500 internal error.
I am confused.
Comment #9
monil-dupe commentedI get one error on reports too on this line of code:
$profile_list[$row->fid] = $row->title;Comment #10
jcnventuraI've just committed to dev the initial port of revenue sharing in D7. I'd appreciate if you could test it.
Comment #12
Enes commentedRevenue sharing does not work. I did all what was said.
But adsense earnings reports do not appear.
The authors reflected in earnings.
>>>>>>>>>>>HELP
Comment #13
jcnventuraIs there a URL to this site?
Comment #14
Enes commentedOk
Site: ankaakademi.com
Please help.
Thanks;
Comment #15
jcnventuraYou seem to be using managed ads only. As specified in the description of the "revenue sharing option":
DOES NOT WORK with new code ad units, such as "Managed Ads" or "Custom Search"
Also, edit your email in the above post, unless you're interested in receiving more spam.
Comment #16
Enes commentedViewing Ads.
But not a revenue-sharing among authors.
Image: http://g1205.hizliresim.com/x/r/6kfx5.png
How do revenue sharing?
Comment #17
jcnventuraRevenue sharing only works with the "old" ad formats.. You have to enable and configure those modules, and replace your current ads with the ones using the old format.
Comment #18
Enes commentedHow could you tell me what to do painting?
I work for a week. But could not.
https://code.google.com/apis/console/ # project: 741036191298: access
There is also such a thing.
Comment #19
jcnventuraThe adsense API is only for large accounts.. I don't have access to that API to test it.
Comment #19.0
jcnventuraI mentioned in text that its a bug and should be fixed.