drupal view rss having extra spaces - drupal

I have created a feed view in drupal and i've set the Rss feed and all the settings properly but the problem is when i click on view feed it returns the page having space above the starting of the file as shown below.
<?xmlns version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="http://cloud.ilinksys.com/feed.xml" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
The above space is already in the page. Anyone have any idea to remove the extra spaces of above the rss feed actual data.?

usually there's extra space before opening php tag <?php in template.php file or any other template or modules file which are called.

Related

Change WordPress address

Question...
How can i change a file address like wordpress addresses such as http://localhost/author/me
that was http://localhost/wp-content/my-theme/author.php ?!!
I want to create new file that doesn't included wordpress files and don't like that show it's address like second address example above...
Rather i want create new address such http://localhost/new
You can Create a New file or template file as under the steps,
Step 1: Locate your theme's existing pages
Locate your theme's directory on the local server or production
server.
Drill down to the theme folder to see your existing page
templates. Locate page.php.
Open it with a script editor.
Step 2: Insert name code
/*
Template Name: My-New-Page-Template
*/
Paste or type this code right before get_header(); ?>
Replace My-Page-Template with your own template name. You don't need the dashes you an use spaces. Also, note that in the above example there's no opening PHP tag because it's up higher in the file. If your opening PHP tag is on the same line as the get_header(); ?> , then your code needs to go right after the opening tag (with a space between).
Step 3: Save your new file
Save the file with a new name and a .php extension. For example - NewPageTemplate.php.
Put the file on the server at /wp-content/themes/yourtheme/NewPageTemplate.php (it's better not to have spaces in a file name.)
Step 5: Add a custom Content in the Main div tag of content
Open the file.
Add Custom Content of code to the page.
<div id="content" role="main">
/* Add Custom Content */
</div>
Step 6: Apply your template to your pages
Go to Pages > Add new.
Choose My-New-Page-Template from the Page Attributes.
Get More Details, you can follow the link - https://codex.wordpress.org/Templates
And Also follow the example of create a new file or template file - https://www.ostraining.com/blog/wordpress/custom-page-template-wordpress/

how to disable or enable newsletter popup in magento 2 porto theme

Here I am using Porto theme in magento 2. I need to disable newsletter popup. There might be a setting for it.
But I don't know where is it. Please help.
Something written in xml file as below:
<referenceBlock name="customer-account-navigation-newsletter-subscriptions-link" remove="true"/>
Line written in xml is correct.
It seems you want to remove newsletter tab from my account page. So to do that I have added the same line in theme customer module file.
app/design/frontend/theme/default/Magento_Customer/layout/default.xml
Code in file
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="customer-account-navigation-newsletter-subscriptions-link" remove="true"/>
</body>
</page>

RSS feed items only link back to homepage of my blog, not the individual posts

I've created an RSS feed, but when someone subscribes to it, either through Google or Yahoo! the only links showing up take them to the blog. And when someone clicks on the links it takes them to my blog whereas I want to show the blog content without people have to click on the link.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>cmg</title>
<link>http://www.example.com/blog</link>
<description>cmg</description>
<item>
<title>cmg</title>
<link>http://www.example.com/blog</link>
<description>cmg</description>
</item>
</channel>
</rss>
I've also put this link in the body of my site and not the head as I don't have access to the <head> using the CMS which doesn't allow me to enter any code apart from CSS or JavaScript.
When creating an RSS feed you have to make sure each <item> node points to a specific post. The channel elements will describe the site overall with the link back to the homepage and a short description. But it's the individual items that will show per post that need to be crafted.
In your case, your item(s) only shows the link to and content of the homepage, or copies what you have in the <channel> parent elements.
An example RSS feed with two posts would be like thus:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>Example</title>
<link>http://example.com/blog</link>
<description>Description of entire site</description>
<item>
<title>Example blog post</title>
<link>http://example.com/blog/example-blog-post</link>
<description>One example straight from the individual</description>
</item>
<item>
<title>Another post</title>
<link>http://example.com/blog/another-post</link>
<description>Another example of a single post</description>
</item>
</channel>
</rss>
In the above example you'll note that each <item> has a uniquie <link> node which points to the permalink of that post as well as the description for it. These are separate and different to those of the <channel> overall.
When the user then subscribes to your feed, it will load the posts into their content aggregator and they will be able to read your posts without have to click back to the site.
You can have a link to the RSS anywhere on the page. If you add that as a <link> in the header, then it will allow browsers that can detect feeds to show the relevant icon, but it's not necessary if you can otherwise provide a means to reach the file and promote it.

RSS feed does not validate on wordpress

I have an error message when I click on my site's rss feed url (both from feedburner and the original atom feed):
"This page contains the following errors:
error on line 2 at column 6: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error."
I Have check with The rss feed validator and this is what I got:
http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Ffeeds.feedburner.com%2FNoCamels
I tried everything they suggested (also restarted the plugins) - but nothing worked.
PLEASE, I need your help!
Yuval
You simply have a blank line outside php tags in your wordpress files.
You should check and remove blank lines in :
wp-config.php
functions.php of your theme
*.php in your plugins
...etc
Take a look here :
http://www.quickonlinetips.com/archives/2009/05/wordpress-feed-xml-parsing-errors/
I had the same problem. The culprit was the wp-trackback.php. Blank space at the bottom. I cleared the blank space and voila. RSS is working now.
I have also this question. I solved from error on line 2 at column 6
You simply have a blank line outside php tags in your WordPress files.
You should check and remove blank lines in :
wp-config.php
functions.php of your theme
*.php in your plugins
...etc
Take a look here

Can't get fields to show in Drupal Views module

I have a view setup in the Views module that outputs an RSS feed of nodes. In the Fields section I have specified that I want the Title, Date and Body in the feed, but Views seems to ignore all but the title (and the link which I haven't specified to include). I know it's using the Views module because if I remove the title for each item or rename the entire feed it is reflected in the actual feed. I don't think there's any tpl files that are restricting the output either, but I don't know all the places to look. Does this sound familiar?
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" >
<channel>
<title>RSS Feed Title</title>
<description>...</description>
<link>http://...</link>
<item>
<title>Title</title>
<link>http://...</link>
</item>
<item>
<title>Title</title>
<link>http://...</link>
</item>
.
.
.
Click on the Feed display tab. Under Basic settings, click on the gear icon for th Row style. Check the Display type and set it to something other than Title only.
You may also want to check out the Views RSS module. It provides more flexibility in terms of what you're able to include in the feed. It's especially useful for including CCK fields in the feed.

Resources