[Solved] Wrong url after copy News module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Masweb
Forum Members
Forum Members
Posts: 173
Joined: Sat May 09, 2009 4:26 pm
Location: Valkenswaard - Nederland

[Solved] Wrong url after copy News module

Post by Masweb »

I've made a copy of the News module and called it "Reports".
Everything works fine exept the reference of the "read-more" url the module makes.

The module creates an url that doesn't exist. By clicking on it you will get an 404 page. The url look the same as in the News module but it's broken.
Last edited by Masweb on Wed Dec 17, 2014 7:48 pm, edited 1 time in total.
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

Re: Wrong url after copy News module

Post by psy »

IMHO and experience, it is bad practice to copy and rename modules on the same site. Upgrades are a nightmare.

Look at ListIt2 (aka ListItExtended) instead. LI2 can do everything News does and you can make as many modules/instances as you need.

Also, I believe News uses database-stored routes. You may need to go into Site Maintenance and 'Upgrade routes'. This may fix your problem OR it may make it worse...

Another solution for your Reports instance maybe CGBlog. This is based on News, does all News does and yet is independent of the News module.
Masweb
Forum Members
Forum Members
Posts: 173
Joined: Sat May 09, 2009 4:26 pm
Location: Valkenswaard - Nederland

Re: Wrong url after copy News module

Post by Masweb »

psy wrote:IMHO and experience, it is bad practice to copy and rename modules on the same site. Upgrades are a nightmare.

Look at ListIt2 (aka ListItExtended) instead. LI2 can do everything News does and you can make as many modules/instances as you need.

Also, I believe News uses database-stored routes. You may need to go into Site Maintenance and 'Upgrade routes'. This may fix your problem OR it may make it worse...

Another solution for your Reports instance maybe CGBlog. This is based on News, does all News does and yet is independent of the News module.
Thanks for your answers.

CGBlog is no option because it's already used.
Used Upgrade routes before but that didn't work
ListIt2 is an option but there are lots of reports in the module jet.
The urls of this are hand made in the url field but that not very user-friendly.

If someone has other options I will be very glad. Otherwise I'm going to copy all content to ListIt2.
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

Re: Wrong url after copy News module

Post by psy »

ListIt2 is an option but there are lots of reports in the module jet.
The urls of this are hand made in the url field but that not very user-friendly.
I don't understand what you're saying?
Masweb
Forum Members
Forum Members
Posts: 173
Joined: Sat May 09, 2009 4:26 pm
Location: Valkenswaard - Nederland

Re: Wrong url after copy News module

Post by Masweb »

psy wrote:
ListIt2 is an option but there are lots of reports in the module jet.
The urls of this are hand made in the url field but that not very user-friendly.
I don't understand what you're saying?
The website is in use so there are a lot of "report" items in yet.
If I'm going to use ListIt2 than I have to move al those item (I think by hand) to ListIt2.

Hope you understand me.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Wrong url after copy News module

Post by Dr.CSS »

If you tried to remake News into another module there is a chance you may have missed a couple of places where it uses [nN]ews, I've done this before, it's actually how CGBlog was born...
Masweb
Forum Members
Forum Members
Posts: 173
Joined: Sat May 09, 2009 4:26 pm
Location: Valkenswaard - Nederland

Re: Wrong url after copy News module

Post by Masweb »

Dr.CSS wrote:If you tried to remake News into another module there is a chance you may have missed a couple of places where it uses [nN]ews, I've done this before, it's actually how CGBlog was born...
Found it in News.module.php

Can I change this to [nR]eport if I called the new module Report or isn't it that simple?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Wrong url after copy News module

Post by Dr.CSS »

Yes but you left the n in there as it should be rR ...

I did a search replace to find all instances of:

1) news
starting with this, not case sensitive, helped find most all instances of the rest except the ews part
2) News
3) ews
4) NEWS
Masweb
Forum Members
Forum Members
Posts: 173
Joined: Sat May 09, 2009 4:26 pm
Location: Valkenswaard - Nederland

Re: Wrong url after copy News module

Post by Masweb »

Dr.CSS wrote:Yes but you left the n in there as it should be rR ...

I did a search replace to find all instances of:

1) news
starting with this, not case sensitive, helped find most all instances of the rest except the ews part
2) News
3) ews
4) NEWS

Great!!! :) Forgot the 3) ews

Works fine now!!! Thanks a lot!
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Wrong url after copy News module

Post by Rolf »

psy wrote:IMHO and experience, it is bad practice to copy and rename modules on the same site. Upgrades are a nightmare.
+1
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Masweb
Forum Members
Forum Members
Posts: 173
Joined: Sat May 09, 2009 4:26 pm
Location: Valkenswaard - Nederland

Re: Wrong url after copy News module

Post by Masweb »

Rolf wrote:
psy wrote:IMHO and experience, it is bad practice to copy and rename modules on the same site. Upgrades are a nightmare.
+1
You are right. But if you archive all the changes you can also do all the upgrades. Normally I don't copy but this times it was useful to do because of roles and rights.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: [Solved] Wrong url after copy News module

Post by Dr.CSS »

I've found that once you run thru the search/replace routine it becomes easy to keep the module up to date, do it every time a new version comes out...
psy
Power Poster
Power Poster
Posts: 463
Joined: Sat Jan 22, 2005 11:19 am

Re: [Solved] Wrong url after copy News module

Post by psy »

I've found that once you run thru the search/replace routine it becomes easy to keep the module up to date, do it every time a new version comes out...
True DrCSS, but then you have to remember which client, which modules, etc. The client will never know and in my experience, you'll never be able to bill for the extra work involved to upgrade each release. It was a decision you made, not the client, to go that way.

I tend to put it in the 'too hard basket'. After I've exhausted standard possibilities with News and CGBlog, I go to ListI2.
Post Reply

Return to “Modules/Add-Ons”