• Resolved sbeaney

    (@sbeaney)


    Is it possible to create pipes that update the categories of existing posts which have been added via another pipe? I see pipes can override the category of an existing post, but I want to keep the current category and add additional categories to the post.

    Alternatively, is it possible to create a pipe that dynamically assigns multiple categories to a single post based on the RSS feed? This would be the optimal solution as I wouldn’t then need multiple feeds.

    Basically, I’m trying to setup a workflow where my users can enter new posts on a main site and tag them according to the categories they fall under (News-A, News-B). I then want to consume RSS feeds with URLs like “/category/news-a/feed/” and “/category/news-b/feed/” to populate the news posts on other topic-specific affiliated sites the users set up.

    I can’t seem to find a way to consume both feeds and obtain the desired output where posts contain all the proper categories assigned to that post on the main site.

    I would expect if the main site has a post named “Post 1” which is marked as both News-A and News-B, that if the post showed up in the feeds for both categories, once consumed the resulting post on the affiliated site would be tagged with both categories automatically.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Tung Pham

    (@phamtungpth)

    Hi @sbeaney,

    Thank you for using our plugin!

    As what you described, I think you will need to have a special Destination to do it.

    If you want to develop a Destination by yourself, please refer the structure of Post Destination at YOUR_PATH_TO_PLUGIN_FOLDER/wp-pipes/plugins/adapters/post folder. Or you could order a custom work at https://thimpress.com/forums/forum/plugins/pre-sale/

    Best Regards!

    Thread Starter sbeaney

    (@sbeaney)

    I’ve taken a look at the post adapter like you said and I don’t think that’s what I need to modify.

    I’ve stepped through quite a bit of the pipes code and it appears when consuming the RSS feed the plugin doesn’t even consider grabbing the post categories from the feed to assign to the new post, despite there being a “[di] category” section that can be assigned to.

    Is perfectly matching up RSS feeds to new posts not the entire purpose of the plugin? Why is there a destination input for category when the source output’s categories aren’t read or parsed? This seems like it’s a massive bug in the plugin.

    Plugin Contributor Tung Pham

    (@phamtungpth)

    Hi,

    No, I do not think that is bug.

    As I know, you also know coding, right? So do you recognize that WPPipes includes add-on(s) to do specific main things. And RSSReader Source is 1 such that add-on. When we built up that built-in add-on, we only made it gives out the common output fields: title, link, author, date, enclosure, content, description. And maybe we will improve that addon to give 1 more output with category in next versions. Or you could clone it to new add-on then code it to become your owned add-on.

    Beside, please go to the detail link of any item from your RSS feed then check if there is displayed data relates to categories! If Yes, you could use HTML Parser Processor to pick up list of categories from original detail link. Find that add-on at https://thimpress.com/product/html-parser-processor-for-pipes/

    Best Regards!

    Thread Starter sbeaney

    (@sbeaney)

    I updated the plugin myself to handle consuming the categories.

    In case you ever do want to release category matching, as the edit pipes page indicates you’re able to do (but fails to actually implement), you’ll need to update the way the object is serialized into JSON. The categories are created as SimplePie_Category objects which fail to deserialize from the JSON cache properly. Alternatively, fix the call returning to deserialized object to make sure the SimplePie_Category objects are handled properly. I’m not familiar with SimplePie so I edited the content pre-serialization.

    I had to add the call “$item[$i]->get_categories()” to assign the “$row->category” object and then parse the result into a pipe (“|”) delimited string from an array of SimplePie_Category objects. I’m parsing them into a pipe delimited string because that’s what the post adapter is expecting to find when parsing the categories. If I left the $row->category object as is, when the post adapter script reads the output it encounters an array of __PHP_Incomplete_Class, which you then can’t get the data out of.

    I’m marking this as resolved, since I resolved it myself, but it’s a shame that such a robust plugin with so much potential is missing some of the basic features you would expect. Also, the fact that your answer was to turn around and try and sell me a product instead of extend the plugin speaks volumes to which end this plugin is supposed to serve. It’s a lot like giving someone a car, but then telling them they have to pay for the wheels, engine, wiper blades, seat belts, etc.

    Plugin Contributor Tung Pham

    (@phamtungpth)

    Hi,

    I do not think your example case “giving someone a car, but then telling them they have to pay for the wheels, engine, wiper blades, seat belts, etc” is exacted. Because with our free WPPipes, the customers could do almost necessary things to import data into their posts, generate RSS feeds from their posts… Of course, there must be more features you and others need, so we will try to update the plugin when we have time. But while that time, with the users who do not want to wait, they could try to use the commercial advanced tools which we built up separately.

    Whatever, thank you for your suggestion about category output field, I just released new version of WPPipes and it is supporting that field now.

    Best Regards!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘RSS Feed w/ Multiple Categories per Post’ is closed to new replies.