enonic / app-rss Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Use the RSS feature of adding category data to each feed item.
Can main.js be used to check if a page template exists that uses the specified controller and supports RSS feed content type? If so we can set up some initialisation script to kickstart usage of the RSS app.
Upgrade the way we include/exclude paths from RSS feeds. It's now done with normal strings in TextLine fields, needs to be done with ContentSelectors instead so that the user can navigate/search for branches in their content instead. Way easier to use.
Should also use occurances
for adding more branches to add/subtract.
Needs mapping to find where name of author is stored ... not very simple probably. But the RSS tags are there if we want to use them.
Setting to turn off the inclusion of full body in RSS feed. Just an excerpt will be used.
Note: In the beta, only excerpt is added as a standard, no body/full text is added at all. We should add the full body, but a setting is needed to actually insert it (per rss content). Default value: false.
If no field for excerpt is found it will come out blank in the feed. Use a cut-out of the full body instead on X words. Make the cutting handle html and such!
new lib-xslt is updated to the latest Saxon library.
Helps to improve stability
No schemas uses help-texts, fix! And simplify readme/docs accordingly.
Timezone handling and settings, reading from content, and output in RSS feed, is handled poorly in this app. This needs much more thinking and testing. It works now, but it is only tested on very few different scenarios, and it is all quick fixes.
Using new functionality in 6.12:
enonic/xp#5412
When adding the pubDate node in RSS we don't handle timezones in a good way. This is needed for 1.0 release. It should detect datetime format and act accordingly.
Enonic version: 6.15.5
Jeg legger til RSS-appen fra Enonic Market og følger instruksjonene, men får bare feilmeldinger i loggen:
java.lang.RuntimeException: javax.xml.transform.TransformerConfigurationException: Failed to compile stylesheet. 1 error detected.
at com.google.common.base.Throwables.propagate(Throwables.java:160)
at com.enonic.lib.xslt.XsltProcessor.handleError(XsltProcessor.java:114)
at com.enonic.lib.xslt.XsltProcessor.handleError(XsltProcessor.java:88)
at com.enonic.lib.xslt.XsltProcessor.process(XsltProcessor.java:80)
at jdk.nashorn.internal.scripts.Script$Recompilation$418$596AA$xslt.L:1#render(com.enonic.app.rss:/lib/xslt.js:25)
at jdk.nashorn.internal.scripts.Script$Recompilation$304$2092A$rss.L:1#get(com.enonic.app.rss:/site/pages/rss/rss.js:275)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:639)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
at jdk.nashorn.api.scripting.ScriptObjectMirror.call(ScriptObjectMirror.java:117)
at com.enonic.xp.script.impl.value.FunctionScriptValue.call(FunctionScriptValue.java:36)
at com.enonic.xp.script.impl.executor.ScriptExportsImpl.executeMethod(ScriptExportsImpl.java:56)
at com.enonic.xp.portal.impl.controller.ControllerScriptImpl.doExecute(ControllerScriptImpl.java:71)
at com.enonic.xp.portal.impl.controller.ControllerScriptImpl.lambda$execute$0(ControllerScriptImpl.java:36)
at com.enonic.xp.trace.Tracer.traceEx(Tracer.java:72)
at com.enonic.xp.trace.Tracer.trace(Tracer.java:51)
at com.enonic.xp.trace.Tracer.trace(Tracer.java:98)
at com.enonic.xp.portal.impl.controller.ControllerScriptImpl.execute(ControllerScriptImpl.java:36)
at com.enonic.xp.portal.impl.rendering.PageRenderer.doRender(PageRenderer.java:48)
at com.enonic.xp.portal.impl.rendering.PageRenderer.doRender(PageRenderer.java:27)
at com.enonic.xp.portal.impl.rendering.PostProcessingRenderer.render(PostProcessingRenderer.java:25)
at com.enonic.xp.portal.impl.handler.render.PageHandlerWorker.execute(PageHandlerWorker.java:128)
at com.enonic.xp.portal.impl.handler.render.PageHandler.doHandle(PageHandler.java:62)
at com.enonic.xp.portal.impl.handler.render.PageHandler.doHandle(PageHandler.java:22)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:66)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:75)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:75)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:75)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:75)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:75)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:75)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:75)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:75)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:75)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:75)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.portal.handler.BasePortalHandler.doHandle(BasePortalHandler.java:48)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:66)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:75)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:75)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.impl.trace.TraceWebFilter.doHandle(TraceWebFilter.java:38)
at com.enonic.xp.web.handler.BaseWebHandler.handle(BaseWebHandler.java:66)
at com.enonic.xp.web.impl.handler.WebHandlerChainImpl.handle(WebHandlerChainImpl.java:30)
at com.enonic.xp.web.impl.handler.WebDispatcherImpl.dispatch(WebDispatcherImpl.java:50)
at com.enonic.xp.web.impl.handler.WebDispatcherServlet.doHandle(WebDispatcherServlet.java:135)
at com.enonic.xp.web.impl.handler.WebDispatcherServlet.service(WebDispatcherServlet.java:63)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at com.enonic.xp.web.impl.dispatch.mapping.ServletDefinitionImpl.service(ServletDefinitionImpl.java:39)
at com.enonic.xp.web.impl.dispatch.pipeline.ServletPipelineImpl.service(ServletPipelineImpl.java:30)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:45)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:36)
at com.enonic.xp.portal.impl.auth.AuthFilter.doHandle(AuthFilter.java:45)
at com.enonic.xp.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:31)
at com.enonic.xp.web.filter.BaseWebFilter.doFilter(BaseWebFilter.java:33)
at com.enonic.xp.web.impl.dispatch.mapping.FilterDefinitionImpl.doFilter(FilterDefinitionImpl.java:40)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:50)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:36)
at com.enonic.xp.web.impl.auth.BasicAuthFilter.doHandle(BasicAuthFilter.java:33)
at com.enonic.xp.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:31)
at com.enonic.xp.web.filter.BaseWebFilter.doFilter(BaseWebFilter.java:33)
at com.enonic.xp.web.impl.dispatch.mapping.FilterDefinitionImpl.doFilter(FilterDefinitionImpl.java:40)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:50)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:36)
at com.enonic.xp.web.impl.context.ContextFilter.lambda$doHandle$0(ContextFilter.java:33)
at com.enonic.xp.context.ContextImpl.callWith(ContextImpl.java:101)
at com.enonic.xp.web.impl.context.ContextFilter.doHandle(ContextFilter.java:32)
at com.enonic.xp.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:31)
at com.enonic.xp.web.filter.BaseWebFilter.doFilter(BaseWebFilter.java:33)
at com.enonic.xp.web.impl.dispatch.mapping.FilterDefinitionImpl.doFilter(FilterDefinitionImpl.java:40)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:50)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:36)
at com.enonic.xp.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:26)
at com.enonic.xp.web.filter.BaseWebFilter.doFilter(BaseWebFilter.java:33)
at com.enonic.xp.web.impl.dispatch.mapping.FilterDefinitionImpl.doFilter(FilterDefinitionImpl.java:40)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:50)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:36)
at com.enonic.xp.web.impl.dos.DosFilterWrapper.doFilter(DosFilterWrapper.java:64)
at com.enonic.xp.web.impl.dispatch.mapping.FilterDefinitionImpl.doFilter(FilterDefinitionImpl.java:40)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:50)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:36)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterPipelineImpl.filter(FilterPipelineImpl.java:29)
at com.enonic.xp.web.impl.dispatch.DispatchServletImpl.service(DispatchServletImpl.java:35)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:860)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:420)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:203)
at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:73)
at com.enonic.xp.web.vhost.impl.VirtualHostFilter.doHandle(VirtualHostFilter.java:50)
at com.enonic.xp.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:31)
at com.enonic.xp.web.filter.BaseWebFilter.doFilter(BaseWebFilter.java:33)
at com.enonic.xp.web.impl.dispatch.mapping.FilterDefinitionImpl.doFilter(FilterDefinitionImpl.java:40)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:50)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:36)
at com.enonic.xp.web.impl.dos.DosFilterWrapper.doFilter(DosFilterWrapper.java:64)
at com.enonic.xp.web.impl.dispatch.mapping.FilterDefinitionImpl.doFilter(FilterDefinitionImpl.java:40)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:50)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterChainImpl.doFilter(FilterChainImpl.java:36)
at com.enonic.xp.web.impl.dispatch.pipeline.FilterPipelineImpl.filter(FilterPipelineImpl.java:29)
at com.enonic.xp.web.impl.dispatch.DispatchServletImpl.service(DispatchServletImpl.java:35)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:860)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:527)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:530)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.xml.transform.TransformerConfigurationException: Failed to compile stylesheet. 1 error detected.
at net.sf.saxon.PreparedStylesheet.prepare(PreparedStylesheet.java:249)
at net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:142)
at net.sf.saxon.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:97)
at com.enonic.lib.xslt.XsltProcessor.createTransformer(XsltProcessor.java:153)
at com.enonic.lib.xslt.XsltProcessor.doProcess(XsltProcessor.java:132)
at com.enonic.lib.xslt.XsltProcessor.process(XsltProcessor.java:71)
... 153 more
RSS feeds are sometimes read by external sites where they use the content as-is. This is not good for the actual content producer unless they can get links back. Other vendors solve this by appending a text at the end of the text (description or full text).
Ability to upload image to use (or use default set on app) for a website's RSS feeds. Add in RSS xml output.
It was reported that Norwegian characters can give encoding erros. ÆØÅ æøå
The current rss inputs don't support whitespace. They just fail silently with a try catch.
We need to add a regex to the input so that whitespaces are not allowed.
It seems like "Paths to include" attribute does not handle more than one value. It is a multi field, but if I add more than 1 value the feed becomes empty.
Fetch this setting from the content, and/or site? Perhaps with waterfall logic too Feed > Content > Site ... something. Also do the transformation from all the different formats to the one format RSS feeds accept: "en-US".
Code will crash when running the controller without any content specifications. Simple to safe guard and check before running. Make sure we don't crash things. Rather show some instructions here? Like "Go and create a new content of type RSS on your site and configure it, resort to our readme/docs for help".
Some might want to turn off the filter that adds RSS meta tags in the head of each page. Perhaps per app and per RSS.
Per app: default on
Per rss (content): default on
If app says "off" and content says "on", the result for this should be "on". The feed will be added to head.
If app says "on" and content says "off", the result for that feed is "off". It will not be added to head.
As a side-note, make sure when adding multiple RSS feeds that all of them are actually added to head and not just one of them.
We now need to create a template manually mapping to a single controller (supplied by this app). It is possible with controller mappings in XP to now automate this connection between CTY and controller. Makes setup easier.
Will possibly be problematic for existing users. Needs testing. Might need 2.0 and upgrade script?
XSLT tries to render a feed even though not all settings are in place in the content. Make more robust.
Actually use the fields/settings for update period and frequency. With override support from the app itself.
SY Update period
SY Update frequency
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.