Topic-icon Bug with Flexicontent (JPATH_BASE)

Active Subscriptions:

None
7 years 2 months ago #62174 by pharweb
Hi,

I've a bug within your component and flexicontent

Please correct this !!

Unable to delete correctly articles in flexicontent

The dev of Flexicontent says that its error in 3rd party plugin:

plugins/opengraph/content/content.php


The deletion is a changing of state so we trigger the change event

Please report this bug to JFBConnect (we have made a workaround but they should fix this)

In file
plugins/opengraph/content/content.php

JPATH_SITE is used instead of correct JPATH_BASE
thus - IF- the backend folder has not been added already to the search path

then the frontend Article model will be loaded at backend
see in the following code that JPATH_SITE is used even when we are at BACKEND

public function onContentChangeState($context, $pks, $value)
{
if($context == 'com_content.article')
{
JModelLegacy::addIncludePath(JPATH_SITE . '/components/com_content/models');
$contentModel = JModelLegacy::getInstance('Article', 'ContentModel');

foreach($pks as $pk)
{
$article = $contentModel->getItem($pk);
$this->tryAutoPublish($article, $value);
}
}
}
The topic has been locked.
Support Specialist
7 years 2 months ago #62177 by mel
It sounds as if they've provided you a temporary work-around to resolve the issue for you for now. If not, let me know. Otherwise, I've added this to our tracker for the next release. It sounds like an easy change, but I'll have to do testing to make sure their solution doesn't break our auto-posting functionality to channels.

-Melissa
The topic has been locked.
Active Subscriptions:

None
7 years 2 months ago - 7 years 2 months ago #62178 by pharweb
Thanks for your reply, but their fix is not functional!
And replace SITE by BASE in your plugin doesn't work ...
Last edit: 7 years 2 months ago by pharweb.
The topic has been locked.
Support Specialist
7 years 2 months ago #62179 by mel
Quick fix since I haven't investigated this yet is to remove or comment out that method from the plugin. If you're not using auto-posting of your Joomla articles to Facebook, etc, then you won't need it.
The topic has been locked.
Active Subscriptions:

None
7 years 2 months ago #62180 by pharweb
What lines in what file should I comment on? Or can I disable this plugin?

Thanks for your help !
The topic has been locked.
Support Specialist
7 years 2 months ago #62181 by mel
You can disable the plugin. If you'd prefer to comment out, the method onContentChangeState starts at line 341 and ends at line 354.
The topic has been locked.
Active Subscriptions:

None
7 years 2 months ago #62182 by pharweb
Thanks !! it's ok now !
The topic has been locked.