Strange behavior on redirecting news addon

Post

Posted
Rating:
#3209 (In Topic #628)
Yesterday I set up the following redirect to "move" the news addon to an "articles" zone:
articles:home ->welcome:news transparent
welcome:news -> articles:home not transparent.
I created a news entry and the redirect was working. However, after adding a new author and another article, the redirect is not working anymore. Am getting urls like http://example.com/articles/news/view/category/news-title which returns a 404 error.

If I manually enter what is supposed to be the correct address for E.g http://example.com/articles/home/view/category/news-title An error message is displayed-

Code

An error has occurred

A field that was supposed to be an integer (for our purposes, a whole number between -2147483648 and 2147483647) was not

I am thinking of removing the redirects and then setting the up again but just thought I should post this here first.

Last edit: by enelson

Post

Posted
Rating:
#3212
Can you please confirm this 'articles' zone is working correctly for normal pages?
(I assume it is 'articles', although you said 'article' once in your post).

You appear to be using a URL scheme, which adds extra complexity.

Also please confirm you are not using custom URL monikers on any of the news posts.

Post

Posted
Rating:
#3213
The zone works correctly for normal comecode pages and even the landing page "home".
I've disabled the url scheme, reset it to raw PHP url, no changes.

Am not using any url moniker.

I've also noticed if the news article is accessed from the cms zone after editing the article by clicking on the view this article link the redirect works, only that the article name is replaced by the article id and the news category is removed so that -
http://example.com/articles/home/view/category/news-title
Becomes
http://example.com/articles/home/view/5

Post

Posted
Rating:
#3214
Hi,

If you want to drop me an email, [email protected], with admin access to the site, I'll make sure it is working for you. If I already have been given some kind of access please remind me (I recognise your name, so I think I may have done - sorry I get a bit blurry, I help on a lot of people's sites).

Post

Posted
Rating:
#3217
Hi,

I just took another look.

I was able to fix it, you need to upload these changes files:
https://raw.githubusercontent.com/ocproducts/composr/master/sources/site.php (sources/site.php)
https://raw.githubusercontent.com/ocproducts/composr/master/site/pages/modules/news.php (site/pages/modules/news.php)

Please take backups before you overwrite them, in case of any compatibility issues.

We're not going to be able to support renaming for all modules, and there may be further issues that I can't provide a solution to (code changes would be needed). For example, the main_news block will still try and link to the 'news' module. While we search to find what zone a module is in when linking to one with consideration for redirects, we do not search to see if a module has been renamed. So for main_news right now I believe it would link to the welcome zone's news module which would then do a visible redirect (at least we're not stupid enough to link to the news module in the redirected zone but still use the old module name).
This could be changed by editing the code to link to the renamed module name explicitly, e.g. sources/blocks/main_news.php.

Post

Posted
Rating:
#3218
I added a tracker issue for this, which I'd consider a new feature:
0003339: Support automatic correct linking for renamed modules - Composr CMS feature tracker

Post

Posted
Rating:
#3219
Hi Chris thanks for the response.
I uploaded the files to /sources_custom and ../modules_custom directories.
Unfortunately it's isn't working as the module still tries to find a "news" page in the articles zone (am wondering what will happen if I creat a "news" page and redirect the module here). However there's an improvement: If I manually input what is supposed to be the correct redirected URL the article is displayed as supposed to outputting an error as it did before.

I can remove the redirects and use the default schemes if it's a bother, although I've sent you access details for the site if you could have a look.

Post

Posted
Rating:
#3224
Ok, basically I forgot to send a changed main_news.php too.
All these fixes will be in the next patch release.

Post

Posted
Rating:
#3612

Hi Chris, am trying to implement the redirect on another installation and am having this issue:
The news category listing in a news entry screen and the news category page try to view the posts for their specified category in a posts/news
 page. The zone am using for the redirect is "posts" with a default page  "post".
Apart from this, everything else is okay, eg. the news category screen redirects properly when clicking on links from the new_category block.

I supposed the bugfixes (via the files you'd uploaded where implemented in future version releases, so I didn't upload those files.

Last edit: by enelson

Post

Posted
Rating:
#3619

.

Post

Posted
Rating:
#3621
I have about 8 topics on my reply-list at the moment, including this - I should get to it this week.

Post

Posted
Rating:
#3644

Post

Posted
Rating:
#3651
The fix did the job!
Thank you.
0 guests and 0 members have recently viewed this.