Use RSS from Bitrix - rss

I'd like to use rss channel from website https://www.staraya-moneta.ru/forum/. For example https://www.staraya-moneta.ru/forum/rss/default/forum/67/.
All works fine. But sometimes I download html-file instead of rss-file.
Can you help me, please, to solve the problem?
Screenshot of html-page

For example, I try to download rss by the following cmd:
curl -XGET -H "Accept: */*" https://www.staraya-moneta.ru/forum/rss/rss2/forum/57/
I see the result:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
I try to download from browser from "Private session"
Result the same
I update page and I get the correct result - rss file
I try to add PHPSESSID and BX_USER_ID to download, but it works only sometimes.

Related

CSS won't load with UTF-8 encoding

trying for several days now to get my webapp to accept UTF-8 encoded requests. I'm out of ideas how to get that going.
Setup:
- DigitalOcean Droplet (Debian)
- Tomcat Container (8.5.43)
- JavaServlet Webapp
What i already did:
- set the locale at my Droplet to de_AT.UTF-8
- set the tomcat config to use UTF-8 for every request on 8080 via config.xml
...
<Connector port=8080 ... URIEncoding="UTF-8" ...>
...
- implemented a CharSetFilter, that is used for every request (web.xml holds the /* mapping for that filter). Code of the Filter:
#Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain next) throws IOException, ServletException {
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html; charset=UTF-8");
response.setCharacterEncoding("UTF-8");
next.doFilter(request, response);
}
- set the encoding on every jsp file with
<%#page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
- set the encoding on every html with
<meta charset="UTF-8" http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- set the encoding in the css with
#charset "UTF-8";
use UTF-8 in eclipse as encoding before exporting to WAR
The CSS does not get loaded although it is referencable via the link in the browser-inspector.
I have deployed it so you can take a look at it:
http://2foliant.tk
Can anyone PLEASE help me out and tell me, why the CSS won't get loaded?
Remove the filter and see the result
Please remove the css tag since it is not related to css problem
Great to hear it is sorted
Accept this as a correct answer if you can do that

How to validate XHTML with Xerces on commandline when w3.org stopped serving some files?

I copied the example XHTML file from the W3C recommendation:
$ cat > sample.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html version="-//W3C//DTD XHTML 1.1//EN"
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/1999/xhtml
http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"
>
<head>
<title>Virtual Library</title>
</head>
<body>
<p>Moved to example.org.</p>
</body>
</html>
The commandline tool sax.Counter does not work for the sample:
$ java -classpath /usr/share/java/xercesImpl-2.11.0.jar:/usr/share/java/xercesSamples.jar sax.Counter -v -n -np -s -f sample.xml
error: Parse error occurred - http://www.w3.org/TR/xhtml11/DTD/xhtml-datatypes-1.mod
java.io.FileNotFoundException: http://www.w3.org/TR/xhtml11/DTD/xhtml-datatypes-1.mod
because one of the included file is missing:
$ wget http://www.w3.org/TR/xhtml11/DTD/xhtml-datatypes-1.mod
--2018-10-22 23:08:30-- http://www.w3.org/TR/xhtml11/DTD/xhtml-datatypes-1.mod
404 Not Found
2018-10-22 23:08:45 ERROR 404: Not Found.
Delete the following two lines in the sample
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
and Xerces will work. Using Java 11 and libxerces 2.11.0:
$ export CLASSPATH=/usr/share/java/xercesImpl.jar:/usr/share/java/xercesSamples.jar
$ java sax.Counter -v -n -np -s -f sample.xml
sample.xml: 25176 ms (6 elems, 10 attrs, 0 spaces, 59 chars)
I am confused as of why the main dtd file is available but the component mod files are not. But at least w3 has kept the components of the xsd file online - until maybe one day they ditch it for some newer method to validate XML.
I quit on Xerces and use xmllint instead.
xmllint works for the said sample.xml. First, you need to manually download all schema files and save them in the same place you keep sample.xml.
Then use the main xsd file for validation:
$ xmllint --schema xhtml11.xsd sample.xml --noout
sample.xml validates
xmllint took 32 seconds to validate the sample.xml
Tested with the xmllint shipped with libxml 2.9.4 on Ubuntu as well as on the default xmllint on OS X Capitan.

Open Graph and internationalization - alway's in english

This is my first web site and i manage to make everything work except that.
I use ASP.Net and "Resources" files and then set the CurrentCulture which work's fine.
Now I want to share page of my website on Facebook. So i did use Open Graph tags.
I did try many combination of tags and i did try to rescrape in the Facebook Debugger but without succes. The retrieve description and title are ALWAY'S IN ENGLISH.
<meta property="og:locale:alternate" content="en_US" />
<meta property="og:locale:alternate" content="fr_FR" />
I also try to add:
<meta property="og:locale" content="fr_FR" />
Without success. I installed curl and run a "refresh" of facebook cache... still without success.
curl -X POST -F "id=http://facteurhumain.ca/facteur/lesNouvelles" -F "scrape=true" -F locale="fr_fr" "https://graph.facebook.com" -s
I did also try to put "en_US" and "fr_FR" in lower caps ("en_us", "fr_fr") without any changes.
Any pist of solution?
Thanks!!

Application Cache Error event: Manifest fetch failed (404) why?

So my appcache is giving this error:
http://nl.tinypic.com/view.php?pic=23uv5eo&s=8#.VGUTs_mG9Zw
My file structure looks like this:
http://nl.tinypic.com/view.php?pic=2yw73oi&s=8#.VGUUXvmG9Zw
My HTML tag:
<html manifest="manifest.appcache" xmlns="http://www.w3.org/1999/xhtml">
Manifest.appcache
CACHE MANIFEST
CACHE:
/images/header/buttonIn.png
/images/header/buttonOut.png
NETWORK:
*
Why am i getting error i'm getting?
Can someone please for once and for all explain to me how to make a file with a .appcache extension? so much unclarity about this.
Since you run an apache server. Try adding AddType text/cache-manifest .appcache to your .htaccess file.
More info about this at this blog post

Resource interpreted as stylesheet but transferred with MIME type text/html

This is my html:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv = "Content-Language" content = "en"/>
<meta http-equiv = "Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="/xxx/app/www/style.css">
Now when I load the page, Safari's inspector gives me:
Resource interpreted as stylesheet but transferred with MIME type text/html
I'm working on localhost with MAMP. I'm not sure what to modify to get this to work. I read that this might be a server problem of some kind.
How do I solve it?
Create an .htaccess file into your root folder (or update the existing one) with this line inside
AddType text/css .css
this will tell apache to send the right content-type header for .css file
There is possibility that not just css resources were interpreted wrongly. It maybe a problem of your webserver configuration.
The best way to check is to go to Chrome -> Network tab and check responses section for each request.
Also you can run $ curl -I http://path_to_file_or_page with terminal and have a look at response, you should see it in following format, e.g. Content-Type: image/jpeg
So, if it will occur that webserver (apache) does it for all filesthen you can try to solve the problem in following way:
Check your /etc/apache2/apache2.conf
If there are any SetHandler application/x-httpd-php line, try to comment it and then reload your apache by $ sudo system apache2 reload
Let us know if the problem is still there.
It could be that your web server is properly configured but it really is returning HTML instead of CSS.
Check that you have the correct path, spelling, case, etc. Hit the URL directly and see what comes back. Your web server might be responding with an error page (HTML) and a 200-Ok instead of a 404-Not Found.
I'm not saying this ever happened to me...

Resources