I may be missing something easy, but I am setting up a paid advert via this module and everything seems to be working well, except for one thing. When I search for a node that is not published, it comes up and is viewable by a different user.

For example:

"Employer" posts a "job" node type with the tile "computer job." "Employer" does not publish the node yet.

"Employee" logs in and searches for "computer" or "job" or "computer job" and it comes up. The node is viewable, but there is a disclaimer saying that it is not published.

Is this happening with anyone else?

Also, if the direct url of the node is entered, it is accessible, even though it is not published. Since I use pathauto, the url would be www.url.com/jobs/computer-job. This isn't as serious of a problem as the search function since it would be tough to guess the job names, but it would be nice to avoid it.

Thanks.

Jesse

CommentFileSizeAuthor
#22 lm_paypal.patch57.96 KBkerauno
#20 lm_paypal.patch56.92 KBkerauno
#18 patch.txt53.22 KBkerauno
#19 lm_paypal.patch51.75 KBkerauno

Comments

LeeMcL’s picture

Assigned: Unassigned » LeeMcL

Are the real contents of the node visible or just the disclaimer?

Which version of Drupal are you using and do you have any additional modules installed?

Lee

apt94jesse’s picture

Good point, it looks like just the disclaimer is displayed. This is helpful, but it is still difficult to use as I can't have employees sifting through half published and half non-published jobs.

I am using the latest 5.x version of drupal and do have several other modules installed. I have views, CCK, and a few smaller ones like comment attach and comment link, none of which would seem to effect the issue.

Thanks for the quick response.

technivant’s picture

Hi,

Thanks for this great module! I'm having a similar problem, using Paid Advert, Contemplate and FlashVideo to provide classified video ads.

The "Not Published" disclaimer displays fine. However, since I have a [video] tag (required by FlashVideo to display the video in the node body) added to the Body template (using Contemplate for this), the video also shows. Is there anyway to hide the entire contents of the node body when the Advert is "Not Published"?

thanks!

neo11yu’s picture

I have similar problem. I just want my nodes to be unpublished for some time. In that period I don't want users to see those nodes. How this can be done?

feelenjoy’s picture

Just a follow up, I am also looking for a way to completely hide the whole node until it is published. I don't want the node to show up with the not published yet message, I would just like it hidden. Anyone know how to do this?

coreyp_1’s picture

I agree that nodes should be unpublished in the node database table until paid for. You can't just set the "body" text to "" using hook_nodeapi(), like is currently being done. It doesn't address CCK fields at all!

Allowing for actual publishing/unpublishing of nodes shouldn't be that difficult to do, either. I have a few ideas:

=== Option 1 ===

* In lm_paypal_subscriptions.module, in the lm_paypal_process_in_subscr($ipn) function, probably around line 1950 (for a subscription commencing) and line 2079 (for a subscription ending) call to a custom hook (say, hook_lm_paypal_subscriber_set_status?). This would allow other modules to tie into the lm_paypal framework.

* In lm_paypal_paid_adverts.module, you could then add a function that makes use of the hook.

=== Option 2 ===

I think this might be the better choice. Incorporate the idea of Actions and Triggers... Instead of complicated coding, just set up a trigger at the two places mentioned in Option 1, and let the end user decide what to do when a subscription ends or begins. In fact, this could open up an entirely new area of usefulness for this module!

=== Other considerations ===

On a user's account page, only nodes that are published are shown in the "subscriptions" table, whether the subscription is active or not. This is hard coded into the SQL (lm_paypal_paid_adverts.module lines 429 & 432. This will have to be changed (perhaps configurable by the site admin?) in order for this to work.

Any other suggestions?

feelenjoy’s picture

any progress been made on this?

algraps’s picture

Hi,
I have resolved two problems in lm_paypal modules:
[1] - Problem:
After a subscriptions payment the nodes wont begin pay. Now , after a payment the nodes will be pay

[2] - Problem:
After the subscriptions payment the nodes wont change status. Now, after a payment the nodes will be change status to publish.

I would like to create an update but i don't know to create a drupal module update.
LeeMcl, can you help me?

Thanks
Alessandro Graps
www.grapscons.com

Clint Eagar’s picture

Could we leverage D5 Workflow-NG or D6 Rules to facilitate the node being published/unpublished?

lyricnz’s picture

Assigned: LeeMcL » Unassigned

The official module maintainer hasn't done any work on this module in 18 months, but recently gave me commit access, which is why there's been a recent flurry in activity :) http://drupal.org/project/cvs/88100

You can find out how to submit "patches" (updates for source code) at http://drupal.org/patch

But... it would be great if we could all discuss some architecture stuff, like use of hooks/rules/workflowng/actions - to make this set of modules more extensible. I don't intend to update the 4.7 branch except for critical security bugs, but will try to maintain both D5 and D6 versions for now.

codenamerhubarb’s picture

Is there a quick and easy solution to overwrite all the cck content of a node to be "unpaid" or even ""(empty)?
Everything works great for me except the unpaid nodes are still showing up as results in Drupal's core search with the CCK fields and their values.

lyricnz’s picture

Not without writing some code, but that should be pretty simple:
- make a new module, set your module weight so it fires *after* lm_paypal_paid_adverts
- Implement hook_nodeapi op=load
- check for $node['body'] == t('Not yet published.')
- if found, return an array of field overrides, eg: array('field_whatever' => t('not paid'), 'field_other' => t('not paid'))

codenamerhubarb’s picture

Thanks for the tip. I'll give it a shot in the next few days when I have some free time.

axgalloway’s picture

Has anyone come up with a working solution for this problem?

As far as I can tell, the latest version of the module still contains the bug. It shows the cck fields of an unpublished node, which is problematic, and also shows it in a search. Is there a way to just unpublish it entirely and have it changed the node status to published like it is supposed to do? Is there a patch someone can post?

lyricnz’s picture

Happy to have contributions from the community, as long as they don't break/change existing functionality (or make the new behaviour optional, and non-default).

axgalloway’s picture

There is a patch on this issue page http://drupal.org/node/168571
that might do it for at least 6.x-1.x dev. I will try it out and post what happened.

axgalloway’s picture

So far no problems, it does the trick for now. I used the latest release of 6.1-1.xdev with the suggested patch. One thing though, it is not a retroactive fix, only the newly created node subscriptions seemed to be affected.

kerauno’s picture

StatusFileSize
new53.22 KB

Here's a patch file for 6.x-2.x-dev that does the following.

4 New admin options:

1. Cron Publish node - allows you to set content types to unpublished. The cron process will publish or unpublish when it runs after payment is made or if the subscriber expires.

2. Expire fudge - add one day to expire time in case you only run cron once a day or you are using a cache server that expires once a day.

3. Prefix node id - prefix node id to the paypal item description

4. Prefix hostname - prefixes hostname to paypal item description.

5. Allows for one-time payment .

Fixes terms "I agree" selection screen. If you had multiple subscriptions tied to a content type, it would only return the first term agreement no matter which "I agree" they selected. (I believe the current release has this bug as well) This mod allows any 9 subscriptions to be displayed with a content type. And when you click on the "I agree" it will only display the subscription that was agreed to on the following screen that says "Proceed to paypal".

Does not cancel subscription when paypal sends cancel or eot. The user may of paid for part of the subscription and it will cancel it when the current cycle expires. The cron publish option must be checked for this feature.

Modifed "My account" to include unpublished nodes and display the following statuses:
If the node is paid and unpublished it will show the "paid: paid date".
Once it is published, it will display "running".
After it expires, it will display the "expired: expired date".

Also added edit link for the "expired" ones to allow the user to easily resubscribe using the same node.

kerauno’s picture

Version: master » 6.x-2.x-dev
Component: Miscellaneous » Code
Status: Active » Patch (to be ported)
StatusFileSize
new51.75 KB

Updated patch file. Had a bug with role type subscriptions when agreeing to the terms.

Also made sure these modifications did not change the default behavior.

kerauno’s picture

StatusFileSize
new56.92 KB

If the current maintainer is intested, this updated patch includes the enhancements listed in #18 and now includes the following:

New admin option "Disable paypal and subscription in my account when no transactions exist that they apply to."

Also note this patch fixes the one-time payment issue that has been reported in the current releease.

lyricnz’s picture

Can someone other than kerauno test this please?

kerauno’s picture

StatusFileSize
new57.96 KB

Found a couple of bugs.

The "paypal publication" was showing to anonymous or to logged in users that did not own the node.

The subscription menu would report an error not enough arguments in "lm_paypal_subscription_access" routine. Changed the argument "$subid" to "$subid = NULL".

if you deleted a node that had an active subscription, the new cron publish process created a blank node. Fixed this problem and now the cron process will cancel the active subscription that was tied to the deleted node.

This is the full patch to 6.x-2.x-dev.

Seneschall’s picture

This patch doesn't actually solve the "Not Published Yet" thing, does it? I tried it, and got the extra admin settings, but I still see the "not published yet".

Thing is, even though I edited ed-classified to be NOT PUBLISHED upon creation by the user, it's still coming in as "published" so I can guess that that's one of the problems. Not sure if that's patch-related or not.