[Solved] Wrong url after copy News module
[Solved] Wrong url after copy News module
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.
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.
Re: Wrong url after copy News module
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.
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.
Re: Wrong url after copy News module
Thanks for your answers.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.
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.
Re: Wrong url after copy News module
I don't understand what you're saying?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.
Re: Wrong url after copy News module
The website is in use so there are a lot of "report" items in yet.psy wrote:I don't understand what you're saying?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 I'm going to use ListIt2 than I have to move al those item (I think by hand) to ListIt2.
Hope you understand me.
Re: Wrong url after copy News module
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...
Re: Wrong url after copy News module
Found it in News.module.phpDr.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...
Can I change this to [nR]eport if I called the new module Report or isn't it that simple?
Re: Wrong url after copy News module
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
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
Re: Wrong url after copy News module
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!
Re: Wrong url after copy News module
+1psy wrote:IMHO and experience, it is bad practice to copy and rename modules on the same site. Upgrades are a nightmare.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: Wrong url after copy News module
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.Rolf wrote:+1psy wrote:IMHO and experience, it is bad practice to copy and rename modules on the same site. Upgrades are a nightmare.
Re: [Solved] Wrong url after copy News module
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...
Re: [Solved] Wrong url after copy News module
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'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...
I tend to put it in the 'too hard basket'. After I've exhausted standard possibilities with News and CGBlog, I go to ListI2.