HighlanderICT Posted July 11, 2022 Posted July 11, 2022 (edited) For years we have published our articles the same way ... Our users, depending on permissions have 3 ways to do it. Admins/Mods can use the backend (create new article) or the front-end (add new article). Our editorial team - which has permissions slightly below moderator level - does not have access to this so creates an article in a dedicated forum (sometimes from a previously created template that is first copied to the relevant forum) and one of the admins or mods then promote these to an article. We use the copy topic and promote posts to articles plugins from @Adriano Faria to make all this work. The resultant article is published on the front page and a copy of the article that stores the comments is also posted to a specific forum (or should be). This was all working flawlessly until recently. My guess is last week when we encountered an error on the site although we didn't publish any articles since June 30 so it could possibly have been earlier (although no updates were done). The error we encountered last week was theme related, causing us to have error 500 all over the place and basically forced up to upgrade from the version we were using (4.6.x) to 4.7 to get rid of the error. We can still use the same article system method in the front or backend as well as the non-admin method to copy topic / promote posts to article and the article itself will still publish to our-picks and also the front page as well as facebook/twitter. HOWEVER, it no longer posts to the forum we tell it to use for the article and comments. Am I missing something here? Did something change? This is the setting in the Database / Forums. I have verified this and rebuilt everything just in case there was an issue. I have also verified that none of the Categories have the over-ride set I have checked two articles I know were done correctly and I can see them promoted to articles as they have a link left behind in the forum where they were created. They appear on the front page and in our picks However, they do not appear in the forum noted in the database config above .... The last time anything went into the forum where it was supposed to go was May 30th so the 2 items shown in OurPicks above are not there but the 3rd one is .... Any hints or suggestions on where to look for this error would be greatfully received? I believe I have checked everywhere I should but its possible I missed some setting that changed between 4.6 and 4.7 and that's throwing me off. Edited July 11, 2022 by HighlanderICT
Jim M Posted July 11, 2022 Posted July 11, 2022 Have you tried disabling all third-party applications/plugins then issuing a test article? Additionally, have you considered only allowing the "editor" group to create articles on the front-end? This could eliminate the need for this third-party plugin you're using.
HighlanderICT Posted July 11, 2022 Author Posted July 11, 2022 Thanks Jim I believed I had done that but when I create an article the standard way after disabling the plugins it seems to work. When promoting a post to an article it does not. Using the latest version of the plugin from @Adriano Faria so will post to the support topic for the plugin. We do like to use the forums to create articles as we tend to use a few templates we have created over the course of a season and just copy them, edit the relevant info and then convert to article. Its a football site so much of the layout is repetitive over the year, just the content is different. will continue looking into it. thanks for your time.
Adriano Faria Posted July 11, 2022 Posted July 11, 2022 (edited) 49 minutes ago, HighlanderICT said: Thanks Jim I believed I had done that but when I create an article the standard way after disabling the plugins it seems to work. When promoting a post to an article it does not. Using the latest version of the plugin from @Adriano Faria so will post to the support topic for the plugin. Sorry, I’m not sure I understand your first post; it’s confusing. Regarding my resource, it does what it is supposed to do: it promotes a post to an article. It was always like that. It has no instruction to create a topic when the article is created. My plugin extends the formElements method to add the topic title as article title and post content as article content. The submission is handled by Pages. End of story for the plugin. It is like that since IPS 4.2 in first version of the plugin. The version is the same since IPS 4.4. I’ll test it tomorrow just to make sure. Edited July 11, 2022 by Adriano Faria
HighlanderICT Posted July 11, 2022 Author Posted July 11, 2022 Hi @Adriano Faria - until V4.7 it did everything we wanted. We often use your copy plugin to copy a template post we setup before to a new thread - all works well and does what it should. We then edit that new thread and when its complete we use the promote post to article plugin to make it an article. It works well and the article is created. So it does what it should. Under 4.6 it does not seem to affect the option chosen in database settings to create a topic in a forum of your choice to store the article and the comments and the new topic is created when you publish the article. Under 4.7 it seems to do everything else but it does not allow the database to create a topic for a new article. I agree, the plugin DOES promote the post to article, but for whatever reason, the article it creates no longer creates its own topic as requested.
Adriano Faria Posted July 11, 2022 Posted July 11, 2022 42 minutes ago, HighlanderICT said: until V4.7 it did everything we wanted. Well, even you are confirming that the core software changed. The plugin didn’t change since IPS 4.4. The article creation in handled by Pages. My plugin does absolutely nothing in this regard. Pages does. Sorry. It does what is programmed to do.
HighlanderICT Posted July 12, 2022 Author Posted July 12, 2022 45 minutes ago, Adriano Faria said: Well, even you are confirming that the core software changed. The plugin didn’t change since IPS 4.4. The article creation in handled by Pages. My plugin does absolutely nothing in this regard. Pages does. Sorry. It does what is programmed to do. Hi Adriano - I agree. The change was to the core software in some fashion, not your plugin which has been happily sitting on our site for years and doing everything that was asked of it, and now somehow the topic is not getting created by pages if that article came from a topic ... That's why I initially posted here not in the plugin support as its a change in how the software behaves. I dont have the coding knowledge to figure it out so I guess we need to live with it, hope it gets fixed, or change our own processes in publishing articles.
Adriano Faria Posted July 12, 2022 Posted July 12, 2022 Can you make a test? Use the built-in feature Copy to database and see it the topic is created. I’m using a mobile phone so I can’t test it now.
HighlanderICT Posted July 12, 2022 Author Posted July 12, 2022 Got an error Quote OutOfRangeException: (0) #0 /chroot/home/<site>/html/init.php(927) : eval()'d code(64): IPS\Patterns\_ActiveRecord::load() #1 /chroot/home/<site>/html/system/Content/Item.php(460): IPS\cms\hook1655->processAfterCreate() #2 /chroot/home/<site>/html/applications/cms/sources/Records/Records.php(2460): IPS\Content\_Item::createFromForm() #3 /chroot/home/<site>/html/applications/cms/modules/front/database/topic.php(257): IPS\cms\_Records::createFromForm() #4 /chroot/home/<site>/html/system/Dispatcher/Controller.php(107): IPS\cms\modules\front\database\_topic->form() #5 /chroot/home/<site>/html/applications/cms/modules/front/database/topic.php(47): IPS\Dispatcher\_Controller->execute() #6 /chroot/home/<site>/html/system/Dispatcher/Dispatcher.php(153): IPS\cms\modules\front\database\_topic->execute() #7 /chroot/home/<site>/html/index.php(13): IPS\_Dispatcher->run() #8 {main} As a test I also tweaked the settings in the DB settings in ACP and asked it to add a prefix to the topic title. Looks like it does create the topic or perhaps more accurately, reuses the topic that was created before. I created a topic called 'test topic 9' in forum 'A' which I promoted to article and should have appeared in forum 'B' based on the DB settings ... However, the topic remained in forum A and was renamed to 'art_test topic 9' which was the prefix i set in the settings.
Recommended Posts