Skip to content
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

Error generating multi-language documentation #416

Closed
ydarias opened this issue Oct 11, 2016 · 7 comments
Closed

Error generating multi-language documentation #416

ydarias opened this issue Oct 11, 2016 · 7 comments
Labels
Milestone

Comments

@ydarias
Copy link

ydarias commented Oct 11, 2016

Hello, I'm doing some tests with Daux.io and one of the main features for us is the multi-language support. Sadly in the first test the generation process fails.

The file structure that we have is:

├── docs
│   ├── config.json
│   ├── en
│   │   └── 00_Getting_started.md
│   ├── es
│   │   └── 00_Getting_started.md
│   └── index.md

And the content in the file config.json is:

{
    "title": "My project",
    "languages": {"en": "English", "es": "Castellano"}
}

The trace given during the process is:

Copying Static assets ...                                                                                                                                                                                 [  OK  ]
Generating ...
- index.html                                                                                                                                                                                              [  OK  ]
- en/Getting_started.html
<header class="Navbar hidden-print">
    <a class="Navbar__brand" href="../index.html">My project</a>

    <div class="Search">
        <svg class="Search__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 451 451"><path d="M447.05 428l-109.6-109.6c29.4-33.8 47.2-77.9 47.2-126.1C384.65 86.2 298.35 0 192.35 0 86.25 0 .05 86.3.05 192.3s86.3 192.3 192.3 192.3c48.2 0 92.3-17.8 126.1-47.2L428.05 447c2.6 2.6 6.1 4 9.5 4s6.9-1.3 9.5-4c5.2-5.2 5.2-13.8 0-19zM26.95 192.3c0-91.2 74.2-165.3 165.3-165.3 91.2 0 165.3 74.2 165.3 165.3s-74.1 165.4-165.3 165.4c-91.1 0-165.3-74.2-165.3-165.4z"/></svg>
        <input type="search" id="tipue_search_input" class="Search__field" placeholder="Search..." autocomplete="on" results=25 autosave=text_search>
    </div>
</header>
<div class="Columns content">
    <aside class="Columns__left Collapsible">
        <div class="Collapsible__container">
            <button type="button" class="Button Collapsible__trigger">
                <span class="Collapsible__trigger--bar"></span>
                <span class="Collapsible__trigger--bar"></span>
                <span class="Collapsible__trigger--bar"></span>
            </button>
        </div>

        <div class="Collapsible__content">
            <!-- Navigation -->

Catchable fatal error: Argument 1 passed to Todaymade\Daux\Format\HTML\Template::buildNavigation() must be an instance of Todaymade\Daux\Tree\Directory, null given, called in /Users/yeray/.composer/vendor/justinwalsh/daux.io/libs/Format/HTML/Template.php on line 59 and defined in /Users/yeray/.composer/vendor/justinwalsh/daux.io/libs/Format/HTML/Template.php on line 107
@ydarias
Copy link
Author

ydarias commented Oct 11, 2016

Looks like the error comes from a call to an undefined variable at file 05_page.php line 22

~/.composer/vendor/justinwalsh/daux.io/templates/layout/05_page.php

One condition to check for $page definition fix the generation process, but probably it breaks another thing ;-)

@ThomasVogelpohl
Copy link

Hi, I do have exactly the same problem with a different multi-language project. Does anybody know the reason for this error ?
Thanks, Thomas

@onigoetz
Copy link
Collaborator

onigoetz commented Nov 3, 2016

Hello, sorry I didn't have a lot of time on my project these days, I will try to look into this sometime soon.

@onigoetz onigoetz added the Bug label Nov 18, 2016
@onigoetz onigoetz added this to the 1.0 milestone Nov 18, 2016
@zibebe
Copy link

zibebe commented Dec 15, 2016

I hope this gets fixed soon, tried it myself but i am an absolute noob with php..

@janvonde
Copy link

would be awesome if this would be fixed!

@ThomasVogelpohl
Copy link

Hi all,
as there seem to be quite some confusion about the multi-language feature, maybe
Justin or someone has got a working example of a multi-language document.
If that could put into a repository and posted, maybe the issue would be clearer.

I am not really sure how the multi-language modi is supposed to work.

Thanks,
Thomas

@onigoetz
Copy link
Collaborator

Hello, sorry it took this long, I fixed this issue and released it in version 0.3.1

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

5 participants