Jump to content
Support Board

Promote Posts to Articles


Adriano
 Share

Recommended Posts

  • Administrator

Promote Posts to Articles


This plugin will allow users to promote posts to articles, by adding the topic title and post content into the proper fields of articles post screen.

Settings:

  • Define which database to use as the Articles
  • Promote only first post
  • Leave link to article in post
  • Option to use topic tags in the article
  • Option to add topic followers to the article
  • Forums where to use the feature
  • Groups allowed to use the feature

 

Requirements:

  • Forums app
  • Pages app

 

Link to comment
Share on other sites

  • 3 weeks later...

Dear Adriano.

I recently acquired "Promote Posts To Article" on their website, but after installing it in my test forum, I see that it does not work.

I get this error when I try to promote a post:

Error: Call to a member function url() on null (0)
#0 C:\xampp\htdocs\proyectoweb\public_html\foros\system\Dispatcher\Controller.php(85): IPS\cms\modules\front\database\hook841->form()
#1 C:\xampp\htdocs\proyectoweb\public_html\foros\system\Dispatcher\Dispatcher.php(146): IPS\Dispatcher\_Controller->execute()
#2 C:\xampp\htdocs\proyectoweb\public_html\foros\forum\index.php(13): IPS\_Dispatcher->run()
#3 {main}

The IPS version is 4.3.5

Can you help me?

Thanks and kind regards

Link to comment
Share on other sites

Of course, do not doubt that the plugin works. What I said was that it did not work for me in my installation. I guess for some mistake of mine, that's why I asked for help.

Yes, I have Pages installed, with a database created and working correctly.

Link to comment
Share on other sites

Well, if you do not come to Spain personally, to eat at my house, it will be difficult for you to see it. I invite you 😅

The only thing I can do is copy the error message that the system has given me.

Error: Call to a member function url() on null (0)
#0 C:\xampp\htdocs\proyectoweb\public_html\foros\system\Dispatcher\Controller.php(85): IPS\cms\modules\front\database\hook841->form()
#1 C:\xampp\htdocs\proyectoweb\public_html\foros\system\Dispatcher\Dispatcher.php(146): IPS\Dispatcher\_Controller->execute()
#2 C:\xampp\htdocs\proyectoweb\public_html\foros\forum\index.php(13): IPS\_Dispatcher->run()
#3 {main}

Link to comment
Share on other sites

Backtrace

#0 C:\xampp\htdocs\proyectoweb\public_html\foros\init.php(537): IPS\_Log::log('Error: Call to ...', 'uncaught_except...')
#1 [internal function]: IPS\IPS::exceptionHandler(Object(Error))
#2 {main}

Link to comment
Share on other sites

In case you need the error code:

Sorry, there is a problem

Something went wrong. Please try again.

Error code: EX0

This error was probably caused by the plugin Promote Posts to Articles.
If the issue persists, disable it and contact the author for further assistance.

Technical Details

Error: Call to a member function url() on null (0)
#0 C:\xampp\htdocs\proyectoweb\public_html\foros\system\Dispatcher\Controller.php(85): IPS\cms\modules\front\database\hook841->form()
#1 C:\xampp\htdocs\proyectoweb\public_html\foros\system\Dispatcher\Dispatcher.php(146): IPS\Dispatcher\_Controller->execute()
#2 C:\xampp\htdocs\proyectoweb\public_html\foros\forum\index.php(13): IPS\_Dispatcher->run()
#3 {main}

Link to comment
Share on other sites

  • Administrator

The only url() that appears in this specific function is:

			$form->add( new \IPS\Helpers\Form\Node( 'category', NULL, TRUE, array(
				'url'					=> \IPS\cms\Pages\Page::$currentPage->url()->setQueryString( 'do', 'form' ),
				'class'					=> 'IPS\cms\Categories' . \IPS\cms\Databases\Dispatcher::i()->databaseId,
				'permissionCheck'		=> function( $node )
				{
					if ( $node->can( 'view' ) )
						{
					if ( $node->can( 'add' ) )
							{
							return TRUE;
						}
	
						return FALSE;
					}
	
					return NULL;
				},
			) ) );

So \IPS\cms\Pages\Page::$currentPage->url()->setQueryString( 'do', 'form' ) is related to a page tied to the DB.

Are you using a page in this DB? The DB needs to be tied to a page to be displayed.

  • Thanks 1
Link to comment
Share on other sites

Oi!

Primeiramente, obrigado por sua ajuda e minhas desculpas por não ter podido responder antes. Estou desenvolvendo o projeto no meu tempo livre e até agora não consegui me conectar.

De acordo com a ajuda que você me deu, decidi criar outro banco de dados e outra página, e agora parece que funciona. Com o banco de dados e a página que criei antes de instalar o plugin, por algum motivo, o plug-in não se conectou. Ou foi o que eu entendi do que você me disse. Talvez não tenha sido isso que você me disse, mas de qualquer forma o plugin já está funcionando.

Eu não me dou bem com programação nem com o inglês. É por isso que pensei que talvez nos entendêssemos melhor em português porque, eu acho que você é brasileiro e eu sou espanhol, e estou mais perto do seu idioma do que do inglês. Com isso e com a ajuda do tradutor do Google, podemos nos entender melhor.

Em todo caso, peço desculpas se perdi seu tempo e muito obrigado pela sua ajuda.

Uma saudação cordial

-------------------------

Hi,

First of all, thanks for your help and my apologies for not having been able to answer before. I am developing the project in my spare time and until now I had not been able to connect.

According to the help you have given me, I have decided to create another database and another page, and now it seems that it does work. With the database and the page you had already created before installing the plugin, for some reason, the plugin did not connect. Or that's what I understood from what you told me. Maybe that's not what you told me but, I do not clarify much with the programming or with English. In any case, the plugin is already working.

Maybe we would understand each other better in Portuguese, because I am Spanish and I am closer to your language than to English. In any case, my apologies if I have wasted your time and thank you very much for your help.

a cordial greeting

Link to comment
Share on other sites

Desculpe, esqueci de comentar que, depois de analisar o seu comentário, cheguei à conclusão de que, o problema que o plugin tinha era que, o banco de dados que eu tinha associado, não tinha categorias. Ele armazena os registros diretamente e talvez seja por isso que não se conectou. Eu não sei exatamente se foi o que aconteceu com ele, mas vou dizer a ele caso ele possa ajudar com outro problema que possa acontecer com outro cliente.

Mais uma vez, obrigado por sua ajuda e uma saudação cordial.

Link to comment
Share on other sites

 Share

×
  • You have 0 invitations left

    Latest Invitations

    1. There are no invited members to display
×
  • Create New...