Closed (fixed)
Project:
Feeds
Version:
8.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Sep 2019 at 19:29 UTC
Updated:
24 Oct 2019 at 18:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
andileco commentedComment #3
megachrizAn alternative would be to add a markup field to the feed entity type (because feeds_feed entities are fieldable), but I suppose we could add a field to the basic settings as well.
Sidenote: I did notice some validation issues when trying to import as an user with less privileges using the UI. This happens when you want your users to import content that they may not create manually. I've been working on fixing this in the case that feeds are created in advance by an admin user: #2811429: Switch to feed owner during manual import..
Comment #4
andileco commentedThanks for weighing in and the other information about the validation issues (those will be useful for me). To my knowledge, you would have to add a new module to get a Markup Field (which I've done on another site, but I didn't love). But let me know if I'm missing something! But my preference would to be have it more like how it's implemented in Core.
Comment #5
andileco commentedHi @MegaChriz, I added a patch that is very similar to how Core does this in the Node module. However, nothing shows on the actual /feed/add/* page. I'm thinking this is because something needs to be done inside
feeds_help()in
node_help(), you can find the following:However, I'm not seeing the equivalent routes in feeds.routing.yml. Do you know what I might be missing?
Comment #6
megachrizI haven't tried, but I think the routes start with
entity.feeds_feed.and then need to be complemented with something that is listed on the "links" section in the annotation of the \Drupal\feeds\Entity\Feed class:Feeds uses the route provider "\Drupal\Core\Entity\Routing\AdminHtmlRouteProvider" to generate the routes for the feeds_feed entity type. That derives from \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider, which says in the docblock the following:
Comment #7
megachrizIf I look at the implementation of
DefaultHtmlRouteProvider::getRoutes()I see underscores used instead of dashes:So I assume one of the routes must be
entity.feeds_feed.edit_form, notentity.feeds_feed.edit-form.Comment #8
andileco commentedOK, this patch should work. Will need to be sure to clear caches since the schema changes. Also, one needs to make sure that their admin theme is getting the block on the /feed/* pages.
Comment #9
dinesh18 commentedLooks good to me except trailing whitespace errors
Comment #10
andileco commentedOK, I think this should fix the whitespace error.
Comment #12
megachriz@andileco
Looks straightforward. I tried the patch and it works. One thing I noticed is that caches need to be cleared before the help text is displayed, but this is also the case with content types in core. I tried also to fill in some javascript code to make sure it isn't executed: text is escaped like it should.
Committed #10 with one change:
I removed one extra use statement in feeds.module (see coding standards message on https://www.drupal.org/pift-ci-job/1410197).