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

[QA] Manual copy / paste misses redirects #94

Closed
jnweiger opened this issue Feb 18, 2022 · 4 comments · Fixed by #122
Closed

[QA] Manual copy / paste misses redirects #94

jnweiger opened this issue Feb 18, 2022 · 4 comments · Fixed by #122
Assignees

Comments

@jnweiger
Copy link
Contributor

jnweiger commented Feb 18, 2022

Seen in https://doc.owncloud.com/server/next/admin_manual/installation/quick_guides/ubuntu_20_04.html#set-up-a-cron-job

User tries to highlight the code with the mouse, Everything except the > character can be highlighted.

image

When the result is pasted, the command fails with an error message of

bash: /var/spool/cron/crontabs/www-data: Permission denied

Something is rotten in the state of Antora.

Backports needed.

FYI: @emma1382 this is what happened to you :-)

@jnweiger
Copy link
Contributor Author

Workaround:

image

Use the "invisible" clipboard icon on the right hand side. This copies everything correctly. Then the commands work.

@jnweiger
Copy link
Contributor Author

jnweiger commented Feb 18, 2022

The next code snippet for ldap user:sync uses a very long line..
This is more challenging due to horizontal scrolling, but works correctly pastes everything.

But then would also fail with permission denied, as the earlier chown command took away write permissions.
Suggest to add chown root /var/spool/cron/crontabs/www-data at the beginning of that block.

Before Ubuntu 20.04 this would have worked. But in Ubuntu 20.04 they apparently changed a kernel default, how dare they!

https://askubuntu.com/questions/1250974/user-root-cant-write-to-file-in-tmp-owned-by-someone-else-in-20-04-but-can-in#1251030

@mmattel
Copy link
Contributor

mmattel commented Feb 18, 2022

Something is rotten in the state of Antora.

Come on, calm down, I have (possibly) identified what it is. Needs some more investigation (around highlight.js) and a change in docs-ui. Possible cause: .hljs-meta --> user-select: none in doc.css
Hint was at: https://alexwlchan.net/2021/10/console-copying/

Found the solution. You have to use the correct source tag in the example in the adoc file.
If the text to highlight starts with bash prompt ($ or >), choose shell (or console). Otherwise, choose bash.
Atm console is used and there, you have a > character at the beginning which is interpreted as starting of a line = do not select it. Changing the source to bash fixes this immediately.

Use the "invisible" clipboard icon on the right hand side...

Yes, the size, the location and other stuff could be improved

code snippet for ldap user:sync ...

Thanks for highlighting the issue. Need to look at this

@mmattel mmattel changed the title [QA] Copy / paste misses redirects [QA] Manual copy / paste misses redirects Feb 18, 2022
@jnweiger
Copy link
Contributor Author

jnweiger commented Mar 1, 2022

Yes, the size, the location and other stuff could be improved

Size and location is just fine. The "other stuff" is what bothers me most: invisibility. Modern UX design ideas ("never distract the user with useful information") gets in our way here.

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

Successfully merging a pull request may close this issue.

2 participants