I'd like to change path for main faq-page and I see no option to do it?

Is it hard coded? Or is it somewhere in views?

Comments

nancydru’s picture

Did you look at the project page?

macmladen’s picture

I did and I found that I can make alias.

But I also looked at code and found that it is hard coded.

I belive that it should be possible to change path in settings or in menu like with other modules. Not a two seconds job but not too complicated either and some need it esp those building in non english language.

I've just changed module with sed -i "s/faq-page/myfaq/g" faq.module (use anything you like instead of myfaq) and it works fine, but as Drupaler, I'd like it more to be done in settings.

Steven Brown’s picture

So first off you should never alter a module like that. If you personally want to fix the situation you should either create a patch or wait for someone that does. Also, you say "like other modules" perhaps you should list out another module that does this but "correctly".

macmladen’s picture

I do not want to alter module this way, it is just a quick hack to get it easily work on my site, nothing more than that and I enclosed what I did for both developers and users that can find it valuable.

That was more a question on if the path is hard-coded or it could be changed some other way and if it is hard coded then my suggestion is that it should not be. I needed it localised but maybe some would want it other way in english as well. The ability to change it could enable other case scenario usage, perhaps.

Steven Brown’s picture

Status: Active » Closed (works as designed)

The way to use a different path the "faq-page" is to alias the page. This is how FAQ has always been, so far it's worked out pretty well. Hope this helps.

macmladen’s picture

Dear developer(s), I'm glad you made this module and I'm thankfull that you did. My remark was just a support question (in case I was missing something obvious). While the case was as it is, design by decision, I've just suggested a path for improvement and this is what community is all about. And while alias is a sort of solution, it would be nicer (and not too complicated either) to have it in field on settings page. Just a suggestion, nothing more. Thanks for your time answering.

Steven Brown’s picture

Status: Closed (works as designed) » Postponed

I'm not sure if Stella designed the FAQ module the way she did for a reason or if she didn't think about the menu path being based off a setting in the FAQ module. Either way I think it's an interesting idea. Wouldn't mind implementing it, after running it by Stella.

Moving this to postponed until further conversation with Stella :)

fenda’s picture

Any update regarding this? I'd be very willing to test a patch if needed.

stella’s picture

marking as D7 stable release blocker

ryan.ryan’s picture

:-/ yea, a hard-coded path is tough. In my use case, the faq is specific to a department in the organization. So a /faq path doesn't fit the structure.

Steven Brown’s picture

Version: 7.x-1.0-rc1 » 7.x-1.0-rc2
Status: Postponed » Active

Sorry for the year later response. I was put on a big project and still going.

Since time has paste our latest version is RC2. I will set this version to RC2 and check that the issue still exists in the latest version.

Steven Brown’s picture

Version: 7.x-1.0-rc2 » 7.x-1.x-dev

Check the latest version and this does not exist yet. Moving the version to dev. I will be working on this ASAP.

Steven Brown’s picture

Status: Active » Needs review
StatusFileSize
new2.99 KB

Here is my first patch for this issue. Please review. Also note this is for the dev version of the module.

sirchaox1224’s picture

Thanks, FatGuy! That patch worked perfectly for me.

Eight months later and this option is still not incorporated into the FAQ module... :(

bisonbleu’s picture

Issue summary: View changes

Patch in #13 works. Thanks @FatGuyLaughing.

WARNING: BEFORE CHANGING THE DEFAULT PATH, if you have menu-items in your main menu whose path are built on the default path e.g. faq-page/[tid] these items will be DELETED when the path is updated. This also applies to the Views supplied by the module. To avoid this:

  • create a new dummy page named FAQ-temp and assign it a menu item in Main menu
  • then, move your whole FAQ menu tree under FAQ-temp and save
  • now go to admin/config/content/faq and change faq-page to e.g. faq123
  • back in the Main menu tree structure, set the path for item FAQ-temp to faq123

So, if you setup a large FAQ menu tree, this patch is a double-edge sword with no handle! Be very careful.

If you have a single page FAQ, then you don't need to worry to much about this since only one menu item is required.

My 2¢: a better version of this patch would be one that issues a warning before a new path can be set.

sanchiz’s picture

Assigned: Unassigned » sanchiz
podarok’s picture

Assigned: sanchiz » Steven Brown
Status: Needs review » Needs work
Issue tags: -D7 stable release blocker

due to #15

paravibe’s picture

Assigned: Steven Brown » paravibe
Issue tags: +dcuacs2015
paravibe’s picture

Assigned: paravibe » Unassigned
Status: Needs work » Needs review
StatusFileSize
new3.44 KB

Status: Needs review » Needs work

The last submitted patch, 19: faq-path-1394284-19.patch, failed testing.

paravibe’s picture

StatusFileSize
new3.44 KB

Oops, here is correct patch )

paravibe’s picture

Status: Needs work » Needs review

Test

paravibe’s picture

alex liannoy’s picture

Looks great.

alex liannoy’s picture

Status: Needs review » Reviewed & tested by the community
podarok’s picture

Status: Reviewed & tested by the community » Fixed

thanks, merged

  • podarok committed e7ac852 on 7.x-1.x authored by paravibe
    Issue #1394284 by paravibe, FatGuyLaughing, Lianik: Change faq-page path
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.