RSS/Atom Feed and 404 Redirect Problem

This is the place to discuss bugs that have been found in the most recent version of PivotX. Posting bugs will ensure that the Development Team is aware of them and that they will be addressed when resources are available.

RSS/Atom Feed and 404 Redirect Problem

Postby Ico-dY » Sun Jun 12, 2011 2:32 am

Website: http://www.turnangel.com
Link to my php info script: http://www.turnangel.com/clean/test.php
PivotX version: 2.2.6 Flat Database (Fresh installation)

1st Problem: Every entry in generated rss/atom feed points to a wrong location.
I don't know if it's a real bug or a wrong configuration...

2nd Problem: the 404 redirect points to a wrong page named "page_.php" with the following error message:

You requested a page, but PivotX encountered a fatal error.
File is not readable!
A needed file ('..//web/htdocs/www.turnangel.com/home/pivotx/db/pages/page_.php') could not be read.
Try logging in with your ftp-client and check to see if it is chmodded to be readable by the webuser (ie: 777 or 766, depending on the setup of your server). Else go back to the last page.
Did you break something? Try logging into PivotX, and see if you'll get more details in the Admin Interface.
Try enabling Debug, and Check the Debug Output for clues what is wrong.
If you can't figure it out, drop by the PivotX Forums. We'll help you! :-)
If you post a message on the forum, please include the following information:
* File is not readable! *
PivotX build: PivotX - 2.2.6
Time taken: 0.052 seconds
Memory taken: 7.2 mb
PHP version: 5.3.6
DB type: flat

-- Backtrace --

» home/index.php:23 - require_once( '/web/htdocs/www.turnangel.com/home/pivotx/render.p~' )
» pivotx/render.php:261 - Parser->output()
» modules/module_parser.php:1344 - Extensions->executeHook( 'after_parse' , ' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 S~' )
» modules/module_extensions.php:601 - Extensions->executeAfterParse( ' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 S~' )
» modules/module_extensions.php:786 - seoCallback( ' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 S~' )
» seo/hook_seo.php:170 - Pages->getPage( null )
» pivotx/objects.php:2557 - PagesFlat->getPage( null )
» modules/pages_flat.php:331 - loadSerialize( '/web/htdocs/www.turnangel.com/home/pivotx/db/pages~' )
» pivotx/lib.php:4212 - renderErrorpage( 'File is not readable!' , 'A needed file ('..//web/htdocs/www.turnangel.com/h~' )
» pivotx/lib.php:439 - debug_printbacktrace( TRUE )


I've copied an empty page named "page_.php" in the db/pages directory and now the redirect correctly works, but I don't know if it's a good solution... :)

Thanks in advance for your help!

Here's my .htaccess file:
# This instruction sets 'index.php' as the default directory index, but on a
# small number of servers this is disabled. If you're having issues with
# mod_rewrite, try commenting out the following line:
DirectoryIndex index.php index.html index.htm

# Some extra settings that are disabled by default since the
# php_flag directive is disallowed on many servers.
# 1) Ensuring that short hand "<?" won't start PHP parsing ...
# 2) Turn off register_globals
# 3) Turn off magic_quotes
#php_flag short_open_tag off
#php_flag register_globals 0
#php_flag magic_quotes_gpc 0

RewriteEngine On
RewriteBase /

# Standard PivotX rules for non-crufty URLs. The rules always work, but non-crufty
# URL must be enabled in the PivotX configuration too before they are actually used.
# If you have enabled localized rewrite prefixes (for page, entry, category, archive
# and so) you need to update/duplicate the rules below accordingly.
RewriteRule ^archive/(.*)/trackback/?$ index.php?trackback&uri=$1&rewrite=archive [L,QSA]
RewriteRule ^archive/(.*)$ index.php?uri=$1&rewrite=archive [L,QSA]
RewriteRule ^entry/(.*)/trackback/?$ index.php?trackback&e=$1&rewrite=entry [L,QSA]
RewriteRule ^entry/(.*)$ index.php?e=$1&rewrite=entry [L,QSA]
# Note: The two following rules match any date from year 1000 up to year 3000
# pretty strictly to avoid matching page URIs starting with numbers ...
RewriteRule ^([1-2][0-9]{3})[/-]([0-1][0-9][/-][0-3][0-9](/.*)?)/trackback/?$ index.php?trackback&uri=$1/$2&rewrite=archive [L,QSA]
RewriteRule ^([1-2][0-9]{3})[/-]([0-1][0-9][/-][0-3][0-9](/.*)?)$ index.php?uri=$1/$2&rewrite=archive [L,QSA]
RewriteRule ^page/(.*)$ index.php?uri=$1&rewrite=page [L,QSA]
RewriteRule ^tag/(.*)$ index.php?t=$1&rewrite=tag [L,QSA]
RewriteRule ^tags(/([^/]*)/?)?$ index.php?x=tagpage&w=$2 [L,QSA]
RewriteRule ^search/(.*)$ index.php?q=$1&rewrite=search [L,QSA]
RewriteRule ^search$ index.php?rewrite=search [L,QSA]
RewriteRule ^visitor(/([^/]*)/?)?$ index.php?x=visitorpage&w=$2 [L,QSA]
RewriteRule ^category/(.*)$ index.php?c=$1&rewrite=category [L,QSA]
RewriteRule ^weblog/(.*)$ index.php?w=$1 [L,QSA]
RewriteRule ^author/(.*)$ index.php?u=$1&rewrite=author [L,QSA]
RewriteRule ^browse/(.*)$ index.php?o=$1&rewrite=offset [L,QSA]
RewriteRule ^rss(/.*)?$ index.php?feed=rss$1&rewrite=feed [L,QSA]
RewriteRule ^atom(/.*)?$ index.php?feed=atom$1&rewrite=feed [L,QSA]

# Some rules to make old Pivot URLs redirect to the new PivotX URLs. You can
# remove this block if you are using a fresh install of PivotX, but if you are
# upgrading from Pivot these rules will make sure that you don't loose any
# visitors. (The rules might have to be adopted if you used non-standard
# locations for archive files and such.)
RewriteRule ^archives/archive_(.*)\.php index.php?a=$1 [R=301,L]
RewriteCond %{QUERY_STRING} id=([1-9][0-9]*)
RewriteRule ^pivot/entry.php index.php?e=%1 [R=301,L]
RewriteCond %{QUERY_STRING} c=([^&]*)
RewriteRule ^pivot/archive.php index.php?c=%1 [R=301,L]
RewriteCond %{QUERY_STRING} tag=([^&]*)
RewriteRule ^pivot/tags.php index.php?t=%1 [R=301,L]
RewriteRule ^rss\.xml$ rss [R=301,L]
RewriteRule ^atom\.xml$ atom [R=301,L]

# Fallback for my old neocms non-existing pages
RewriteRule ^neocms/(.*)\.html$ index.php [R=301,L]
RewriteRule ^neocms/(.*)\.php$ index.php [R=301,L]

# Fallback for non-existing pages: Show the PivotX 404 page instead.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(([a-z0-9_-]+)(/([a-z0-9_-]*))?)$ index.php?uri=$1&rewrite=page [L,QSA]
Ico-dY
 
Posts: 2
Joined: Sat Jun 11, 2011 3:10 pm

Re: RSS/Atom Feed and 404 Redirect Problem

Postby Harm10 » Sun Jun 12, 2011 10:30 am

First, these are 2 totally different subjects. Please post 1 problem per post.

If you select both your feeds and mouse over the links per entry you'd see that your URL is in there twice. So there is something wrong with your feed definition. So what did you put into the fields in the weblog definition? If you only have 1 weblog those fields can be empty.

If I look at your htaccess file I notice that you switch on all kinds of rules while you say you have a fresh install. So no need for old Pivot support, I think.
Did you switch on mod-rewrite in configuration? If so switch it off for now, do not use htacess and check whether navigation is correct. If so, switch on the mod-rewrite again and one by one activate the rules in htaccess until you get to the point things go wrong (obivously creating that special page yourself should not be needed..... ;) )
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: RSS/Atom Feed and 404 Redirect Problem

Postby Ico-dY » Mon Jun 13, 2011 10:27 am

Harm10 wrote:First, these are 2 totally different subjects. Please post 1 problem per post.

Ops, I'm really sorry for that. :oops:

If you select both your feeds and mouse over the links per entry you'd see that your URL is in there twice. So there is something wrong with your feed definition. So what did you put into the fields in the weblog definition? If you only have 1 weblog those fields can be empty.

Ok, I've solved this problem! Practically the fields content(empty) in the Weblogs section didn't match the content of ser_weblogs.php file. I've deleted the weblog from the dashboard and created a new one. Now everything works perfectly.

If I look at your htaccess file I notice that you switch on all kinds of rules while you say you have a fresh install. So no need for old Pivot support, I think.

Thanks for the suggestion, I've deleted these rules. :)

Did you switch on mod-rewrite in configuration? If so switch it off for now, do not use htacess and check whether navigation is correct. If so, switch on the mod-rewrite again and one by one activate the rules in htaccess until you get to the point things go wrong (obivously creating that special page yourself should not be needed..... ;) )

I'm still investigating, but I've tried everything without success...

Thank you again for your support! ;)
Ico-dY
 
Posts: 2
Joined: Sat Jun 11, 2011 3:10 pm


Return to 2.x Bugs

Who is online

Users browsing this forum: No registered users and 2 guests

cron