doctrine / mongodb-odm

The Official PHP MongoDB ORM/ODM
https://www.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/
MIT License
1.09k stars 502 forks source link

Some documentation pages don't show up in the table of contents #2099

Closed alcaeus closed 2 years ago

alcaeus commented 4 years ago

Bug Report

While looking up some documentation, I noticed that the Reference mapping documentation is not linked in the table of contents of the website. We should add this and double-check to make sure all documentation is accessible on the website.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

malarzm commented 4 years ago

This is weird, I see the link in https://github.com/doctrine/mongodb-odm/blob/2e1d0bfd4b325449030c0bfde2ebd273cefba10a/docs/en/sidebar.rst but not on the website

SenseException commented 4 years ago

Maybe there's something wrong with the page itself or the rst build. This needs further investigations.

maxgorovenko commented 3 years ago

Wow! Found some very-very useful pages! I think you underestimate this bug.

maxgorovenko commented 3 years ago

Can someone say how this doc builds? Did not find any scripts|configs inside this repo. Have some ideas, did fix, but can't check :(

alcaeus commented 3 years ago

Pinging @SenseException for help with the docs system.

maxgorovenko commented 3 years ago

Trying to build with this extensions, but still got problems with toc in sidebar:

extensions = [
    'sensio.sphinx.configurationblock',
    'sensio.sphinx.phpcode',
    'sphinxcontrib.fulltoc'
]
SenseException commented 2 years ago

The node injected in Doctrine\RST\Directives\Toctree::process() contains the list of the files, but some of them already have a borked format.

/reference/introduction
/reference/architecture
/reference/console-commands
/reference/basic-mapping
/reference/custom-mapping-types
/reference//reference-mapping
/reference/bidirectional-/references
...

It seems it's not a problem of the rst toctree, but of the parser. The ones like /reference//reference-mapping and /reference/bidirectional-/references are missing as far as I can see on the website.

malarzm commented 2 years ago

@SenseException any idea how could that be happening? Links in https://github.com/doctrine/mongodb-odm/blob/2.3.x/docs/en/sidebar.rst are correct :/

maxgorovenko commented 2 years ago

I guess the problem could be in word reference which can be kind of reserved word. But I didn't find out how the doc has been generated :(

malarzm commented 2 years ago

@maxgorovenko I think that might be partially true! But I think it's not a reserved word but a wrong search-and-replace, something like reference to /reference which doesn't stop after first replacement. @SenseException does it ring any bell for the build process?

malarzm commented 2 years ago

Got it! https://github.com/doctrine/doctrine-website/blob/c6c909842136085cb05f202b03a7d56387ce0d8e/lib/Docs/RST/RSTCopier.php#L171

SenseException commented 2 years ago

You were faster. :-D