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

Git creates Slug::getDefaultValue error #84

Open
vaniwiki opened this issue Mar 26, 2024 · 16 comments
Open

Git creates Slug::getDefaultValue error #84

vaniwiki opened this issue Mar 26, 2024 · 16 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@vaniwiki
Copy link

Screenshot 2024-02-23 at 08 02 38

I would like to point to this issue, which persists for me. Not sure what I did wrong to achieve this, but it happens on several of my pages, and seems non-reversible.

@gerardnico
Copy link
Member

gerardnico commented Mar 27, 2024

Hi Eivind,

Sorry for that.

When using the UI, the empty string means that we delete the slug and that the value is then null. If it's stored as an empty string, you would get this error. The previous commit should take care of that.

If you update, the problem should disappear.

All good?

@gerardnico gerardnico added bug Something isn't working question Further information is requested labels Mar 27, 2024
@gerardnico gerardnico self-assigned this Mar 27, 2024
@vaniwiki
Copy link
Author

I believe I have updated now, but the problem persists. I am adding files via git...

@gerardnico
Copy link
Member

You may have then another value that is considered empty by PHP (0, ...)
Can you attach the metadata file of this page?

@vaniwiki
Copy link
Author

Persistent metadata for the page:

{"aliases":[{"path":":books"}],"contributor":{"admin":null},"creator":"","date":{"created":1691852828,"modified":1711548528},"description":{"abstract":"A.C. Bhaktivedanta Swami Prabhupada's original books.","origin":"frontmatter"},"format":{"text":{"Content-Type":"text/plain; charset=utf-8"}},"h1":null,"h1_parsed":"Books","label":null,"last_change":{"date":1711548528,"ip":"115.187.39.120","type":"E","id":"books:start","user":"admin","sum":"Metadata frontmatter store upsert","extra":"","sizechange":254,"mode":"page"},"lead":null,"low_quality_indicator_calculated":true,"name":"Books","page_id":"s64h39ggxeh0z22d2uws6","slug":":books:start","template":null,"title":"Books by His Divine Grace","toc":[{"link":"#books","title":"Books","type":"ul","level":1}],"user":""}

@gerardnico
Copy link
Member

I can't reproduce it with your data.

With the previous commit, I just made it clear where the error comes from.
If you update it the error should show the page that triggered this error.

A slug cannot be null at all because it uses the title and the title does not allow null also. The error should have been triggered way before if it was the case.

@gerardnico
Copy link
Member

If I need to go further, I need a test case otherwise it will cost may too much time that I don't have.

May be recreating the page is also a solution. I dunno ... all the best.

@vaniwiki
Copy link
Author

Ooops... I feel embarassed. Here is the output:

Error: An error has occurred while getting the output. Error: The default title of the page (wiki://markup>books:.git:) should not be empty.

I have directories inside the data folder that come from GitHub. But now I'm rethinking that strategy. I suppose there may be some unintended side effects... You mentioned symlinks to overcome this issue previously, but I didn't understand what you meant. If you know how to use git folders properly as a data source, I'd be very eager to know.

Sorry for the trouble, by the way.

@gerardnico
Copy link
Member

All goods.
Just don't put the DokuWiki folder at the root of the git repo.
We do it like that

@gerardnico
Copy link
Member

No database, easy but with data error :)

@gerardnico
Copy link
Member

gerardnico commented Mar 28, 2024

You put your git repository somewhere and you create symlinks to your installation.

mklink  /D /path/to/dokuwiki /path/to/git

@gerardnico gerardnico added enhancement New feature or request and removed bug Something isn't working labels Mar 28, 2024
@gerardnico gerardnico changed the title Slug::getDefaultValue error Git creates Slug::getDefaultValue error Mar 28, 2024
@vaniwiki
Copy link
Author

vaniwiki commented Mar 29, 2024

Thanks for the pointers! I have restructured my git repositories to include a root folder, making it painless to symlink.

I have moved my git repositories into a /repositories folder in my home directory, and symlinked properly. But combostrap throws errors and doesn't show any files in the sidebar navigation. Edit: The proper page still shows in the browser, so everything works except navigation...

Sorry. An internal error has occurred: Unable to get back the wiki path from the local path. Error: The local path (file:///home/vaniw/repositories/prabhupada-books/books/bg/foreword.txt) is not inside a wiki path drive.

I'd really appreciate any last tips or fixes to this one, then my website should actually be working again!

@vaniwiki
Copy link
Author

Screenshot 2024-03-29 at 18 04 53

Attaching this screenshot to possibly give some clues without too much effort...

@gerardnico
Copy link
Member

I’m off for the weekend. Next week in a pause, I will try to write our git installation.
It works for us, it should work for you.

@vaniwiki
Copy link
Author

vaniwiki commented Mar 29, 2024

Just providing additional information in search of a solution:

I tried moving the git repo into the dokuwiki root folder, as well as the farm animal's root folder, but to no avail. (I think you may be on a Windows machine, since you gave the Windows way of making symlinks. I'm on a linux server, if that makes a difference.)

Anyhows. I feel we're close to a solution where (almost) everything works again! Hooray :)

@vaniwiki
Copy link
Author

Current working solution: Just copy the directories from repo into data folder. Not ideal, but at least the site works. :)

@gerardnico
Copy link
Member

Well done ! Thanks for the feedback.

I’m on Linux. I will write the piece next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants