Skip to content

:method: role creates wrong url #2156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wouterj opened this issue Jan 18, 2013 · 31 comments
Closed

:method: role creates wrong url #2156

wouterj opened this issue Jan 18, 2013 · 31 comments
Labels

Comments

@wouterj
Copy link
Member

wouterj commented Jan 18, 2013

We have a very strange error on the documentation. If you take a look at http://symfony.com/doc/current/components/finder.html (or any other article which uses the :method: role) the links to the API docs for methods become something like this: http://api.symfony.com/2.1/Symfony/Component/Finder/Finder.html#exclude() while it should become this: http://api.symfony.com/2.1/Symfony/Component/Finder/Finder.html#method_exclude.

I thought it was an error in the extensions created by Fabian, but that looked correct:

full_url = base_url % full_class.replace('\\', '/') + '.html' + '#method_' + method

The link that is created looks like the old way of generating links. When we changed to the new link format in the API doc generator, @weaverryan had changed this 8 months ago in: fabpot/sphinx-php@a9d5ec5

To me, it looks like the documentation generator uses an old version of the sphinx extensions by Fabien.

/cc @fabpot

@weaverryan this should get a 'website' label

@weaverryan
Copy link
Member

@wouterj - nice detective work :). Yes, I completely agree - looks like symfony.com is perhaps using an older version of the sphinx extensions which are causing these :method: links to render incorrectly.

@wouterj
Copy link
Member Author

wouterj commented Jan 20, 2013

@weaverryan strangly enough, the :phpmethod: role that I added some weeks ago works correctly on the site.

@wouterj
Copy link
Member Author

wouterj commented Feb 6, 2013

ping @fabpot @sensio this issue still exists.

@wouterj
Copy link
Member Author

wouterj commented Feb 19, 2013

ping again @fabpot I think it is important to fix this, as broken links in the documentation is not something people like...

@wouterj
Copy link
Member Author

wouterj commented Apr 26, 2013

ping @fabpot, this is an urgent bug as nobody likes not working links

@wouterj
Copy link
Member Author

wouterj commented Jan 4, 2014

@wouterj
Copy link
Member Author

wouterj commented Mar 17, 2014

ping @javiereguiluz this is a very important bug which is open for too long if you ask me :)

@stof
Copy link
Member

stof commented May 14, 2014

@javiereguiluz can you update the submodule on the doc builder ? The symfony-docs repo points to a fixed version of the extension since months, but it looks like the prod has not updated the submodules since a very long time.

@xabbuh
Copy link
Member

xabbuh commented Jul 26, 2014

ping @javiereguiluz

@Baptouuuu
Copy link
Contributor

problem still existing, the submodule points to the fixed version of sphinx-php. Just need a git submodule foreach git pull where the builder is executed?!

@stof
Copy link
Member

stof commented Aug 14, 2014

what needs to run on the build server is git submodule update to update the submodules to their revision /cc @javiereguiluz

@wouterj
Copy link
Member Author

wouterj commented Aug 14, 2014

The whole process of generating the documentation will be revisited if I'm correct, so I hope this can be fixed then too.

@javiereguiluz
Copy link
Member

@fabpot links to API methods look wrong (they are http://...#lorem_ipsum() instead of http://...#method_lorem_ipsum).

The solution could be easy because according to @stof the server is using an outdated version of fabpot/sphinx-php. This error was fixed a long time ago here: fabpot/sphinx-php@a9d5ec5.

@stof
Copy link
Member

stof commented Sep 5, 2014

@javiereguiluz to be clear, the submodule in the symfony-docs repo points to a working version since several months. But it looks like git submodule update is not launched in the build server. It should be part of the process.

@xabbuh
Copy link
Member

xabbuh commented Nov 7, 2014

Given that the extension was updated recently, the issue must be something else.

/cc @javiereguiluz @fabpot

@stof
Copy link
Member

stof commented Nov 7, 2014

@javiereguiluz could it be possible that env.app.config.api_url_pattern is set in the config used when building the doc for real ? If yes, the fix done 8 months ago in the extensions would not fix the prod, given that it affects the default url pattern only.

@xabbuh
Copy link
Member

xabbuh commented Nov 7, 2014

@stof api_url_pattern was introduced only a few weeks ago: fabpot/sphinx-php@7818747

@mayeco
Copy link
Contributor

mayeco commented Nov 7, 2014

This is happening again

@wouterj
Copy link
Member Author

wouterj commented Nov 7, 2014

It's still happening :)

However, the extension existed before the repository existed and this was one of its earlier extensions. Could it be possible that the documentation build process is using the 2 extensions, both the old one and the repository that already exists? Or maybe this was registered somewhere else and when the extensions were open sourced, they forgot to point to the correct file?

@javiereguiluz to check this easily by checking the extensions setting in the conf.py config. Does it point to the sensio.sphinx.phpcode extension? And does that string point to the correct extension path?

@xabbuh
Copy link
Member

xabbuh commented Dec 12, 2014

Is there really nothing we can do about this?

@xabbuh
Copy link
Member

xabbuh commented Dec 12, 2014

@wouterj @weaverryan As a last resort, we could use the method_ prefix in the docs itself, but that's a really ugly workaround.

@javiereguiluz
Copy link
Member

I will take care of this issue and I'll try to provide a definitive answer soon.

@xabbuh
Copy link
Member

xabbuh commented Dec 12, 2014

@javiereguiluz Thank you very much.

@wouterj
Copy link
Member Author

wouterj commented Apr 25, 2015

@javiereguiluz do you have an answer already?

@javiereguiluz
Copy link
Member

@wouterj unfortunately I don't. I have sent several emails about this to the person responsible of fixing it but I never got a response :(

@xabbuh
Copy link
Member

xabbuh commented Jun 2, 2015

@fabpot @javiereguiluz I don't want to sound harsh, but it really is a pity to have this issue open for so long. Is there anything that we can do to solve this?

@javiereguiluz
Copy link
Member

@xabbuh this issue may have been finally solved. A change has been deployed and it will be applied the next time the documentation is rebuilt. Let's wait and see.

@wouterj
Copy link
Member Author

wouterj commented Jul 23, 2015

Woot, great news :) (and just in time, I was planning to ping you on this at the meeting this afternoon 😉 )

@xabbuh
Copy link
Member

xabbuh commented Jul 23, 2015

You may not believe me, but I really did not read your comments before the meeting. :)

@javiereguiluz
Copy link
Member

I'm happy to confirm that this error has been fixed and now all the :method: links work as expected 🎉 🎉 🎉

@fabpot fabpot closed this as completed Jul 24, 2015
@xabbuh
Copy link
Member

xabbuh commented Jul 24, 2015

woohoo 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants