Jump to content

Pay to Pin Topics


Recommended Posts

4 hours ago, ahc said:

Er, I'm not sure if a log would be present for my specific issue?  It's just about the button not reappearing when an invoice expires.

If it’s not running for yiu, then something should be logged in System Logs or Error Logs.

Can you provide ACP access? I’ll have to debug in your install. 

Edited by Adriano Faria
Link to comment
7 hours ago, Adriano Faria said:

If it’s not running for yiu, then something should be logged in System Logs or Error Logs.

Can you provide ACP access? I’ll have to debug in your install. 

Yeah no problem. Dawpi is helping me out with something else as well so I’ll need to make a new acc for you both to use when I get home from work. 

Link to comment
  • 5 weeks later...

I am getting an error in the cron and it is in the logs. Is there something that i am missing int he DB?

SELECT * FROM `paytopintopics_topics`  LEFT JOIN `forums_topics` ON paytopintopics_topics.ptpt_topic_id=forums_topics.tid WHERE pinned=1 AND ptpt_status='pinned' AND ptpt_limit<1630680301 ORDER BY tid DESC LIMIT 25
Column 'ptpt_status' in where clause is ambiguous

 

 

#0 /home/skupper/www.bmw2002faq.com/system/Db/Select.php(383): IPS\_Db->preparedQuery('/*ipb_prd::ipdb...', Array, true)
#1 /home/skupper/www.bmw2002faq.com/system/Db/Select.php(577): IPS\Db\_Select->runQuery()
#2 /home/skupper/www.bmw2002faq.com/applications/paytopintopics/tasks/pinRequest.php(42): IPS\Db\_Select->count()
#3 /home/skupper/www.bmw2002faq.com/system/Task/Task.php(367): IPS\paytopintopics\tasks\_pinRequest->IPS\paytopintopics\tasks\{closure}()
#4 /home/skupper/www.bmw2002faq.com/applications/paytopintopics/tasks/pinRequest.php(66): IPS\_Task->runUntilTimeout(Object(Closure))
#5 /home/skupper/www.bmw2002faq.com/system/Task/Task.php(266): IPS\paytopintopics\tasks\_pinRequest->execute()
#6 /home/skupper/www.bmw2002faq.com/system/Task/Task.php(229): IPS\_Task->run()
#7 /home/skupper/www.bmw2002faq.com/applications/core/interface/task/task.php(58): IPS\_Task->runAndLog()
#8 {main}

 

Thanks for the help!

Steve K.

Edited by misfit76
Link to comment
On 9/3/2021 at 12:48 PM, misfit76 said:

SELECT * FROM `paytopintopics_topics`  LEFT JOIN `forums_topics` ON paytopintopics_topics.ptpt_topic_id=forums_topics.tid WHERE pinned=1 AND ptpt_status='pinned' AND ptpt_limit<1630680301 ORDER BY tid DESC LIMIT 25
Column 'ptpt_status' in where clause is ambiguous

Not sure how you're getting this error:

	public function execute()
	{
		$this->runUntilTimeout( function()
		{
			$sql = \IPS\Db::i()->select( '*', 'paytopintopics_topics', array( "pinned=1 AND ptpt_status=? AND ptpt_limit<?", 'pinned', time() ), 'tid DESC', 25 )->join( 'forums_topics', 'paytopintopics_topics.ptpt_topic_id=forums_topics.tid' );
			if ( !$sql->count() )
			{
				return FALSE;
			}

There's only one ptpt_status column in the app and it's not duplicated in the query, etc.

You probably still have these columns in your topics table from the old plugin; it should have been dropped. Make sure you don't have them in forums_topics table. If you have, drop them. Let me know if you need help to check and drop the columns.

Link to comment
10 hours ago, Adriano Faria said:

Not sure how you're getting this error:

	public function execute()
	{
		$this->runUntilTimeout( function()
		{
			$sql = \IPS\Db::i()->select( '*', 'paytopintopics_topics', array( "pinned=1 AND ptpt_status=? AND ptpt_limit<?", 'pinned', time() ), 'tid DESC', 25 )->join( 'forums_topics', 'paytopintopics_topics.ptpt_topic_id=forums_topics.tid' );
			if ( !$sql->count() )
			{
				return FALSE;
			}

There's only one ptpt_status column in the app and it's not duplicated in the query, etc.

You probably still have these columns in your topics table from the old plugin; it should have been dropped. Make sure you don't have them in forums_topics table. If you have, drop them. Let me know if you need help to check and drop the columns.

 

Help finding if they exist and dropping them is appreciated

steve

Link to comment
  • 3 months later...

If we uninstall the app and reinstall it, will we lose purchase history on member accounts? We're still having the issue where expired invoices do not force the button to reappear within topics, so we're resorting to just doing a fresh install at this point. We've lost a lot of revenue from this in the last 3 months.

Link to comment
3 minutes ago, Adriano Faria said:

If you mean TOPICS PINNED, of course you need to make a backup of the table of this app.

No, I meant if we view the purchase history of a member on our site, will it still show when they purchased pins in the past? We currently only have 3 topics pinned which I will manually re-pin myself. Unless I go in and manually change the expired invoices to cancelled, people can't pin their topics (most of our members keep the same topic for a long time and just re-pin it multiple times) and I don't really have the time to do that, which is why I'm resorting to this option.

I haven't uninstalled it yet per the error above.

Edited by ahc
Link to comment
1 minute ago, ahc said:

No, I meant if we view the purchase history of a member, will it still show when they purchased pins in the past? We currently only have 3 topics pinned which I will manually re-pin myself. Unless I go in and manually change the expired invoices to cancelled, people can't pin their shops and I don't really have the time to do that, which is why I'm resorting to this option.

I haven't uninstalled it yet per the error above.

Oh yes, it will. On \IPS\Application:

		...
		\IPS\Db::i()->delete( 'core_member_history', array( 'log_app=?', $this->directory ) );
		...

If you want to keep these records, I suggest you to comment this line, uninstall the app and then revert the file edit after/before reinstall. This, of course, if you have access to FTP in your server.

Let me know if you want more detailed info. I can send a message.

Link to comment
34 minutes ago, Adriano Faria said:

Oh yes, it will. On \IPS\Application:

		...
		\IPS\Db::i()->delete( 'core_member_history', array( 'log_app=?', $this->directory ) );
		...

If you want to keep these records, I suggest you to comment this line, uninstall the app and then revert the file edit after/before reinstall. This, of course, if you have access to FTP in your server.

Let me know if you want more detailed info. I can send a message.

I currently don't. I've been waiting over a month to regain access with no response with my server host since my old credentials are no longer working. If we can't keep the records, it wouldn't be the end of the world.

However, the app is no longer working after attempting to uninstall it and it failing.

Link to comment

I have no idea what happened there. Uninstall is a Core method.

Did you check the logs? Anything related to this app?

If not, delete its folder from /applications, its tables and its record from core_applications and rebuild the cache.

Send a message if you want me to do it Monday morning. 

Edited by Adriano Faria
Link to comment
41 minutes ago, Adriano Faria said:

I have no idea what happened there. Uninstall is a Core method.

Did you check the logs? Anything related to this app?

If not, delete its folder from /applications, its tables and its record from core_applications and rebuild the cache.

Send a message if you want me to do it Monday morning. 

I think I can save you the trouble and do this myself if you can expand on "rebuild the cache" a little bit more. I know where to find the folder, tables, and records within the core_applications table.

Link to comment
  • 3 weeks later...
  • 6 months later...
On 7/28/2022 at 9:47 AM, Emediate said:

I'm trying to buy this via Marketplace from AdminCP, and for the life of me I can't get it to show so I can purchase. Any ideas?

Just an update. It comes up when you search exactly "pay to pin topics" with the inverted commas 🙂

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...