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

confirming fails #485

Closed
stefangweichinger opened this issue Mar 7, 2024 · 15 comments
Closed

confirming fails #485

stefangweichinger opened this issue Mar 7, 2024 · 15 comments

Comments

@stefangweichinger
Copy link

nextcloud-28.0.3, appointments-2.0.1

When I test adding an appointment while not logged into NC (2nd browser, for example), I get to the point where I click the link in the received email .. this gets me to the website again, to confirm there.

Then I get "page not found".

My NC runs at https://my.tld/nextcloud/ and the page not found seems to be messed up:

https://my.tld/nextcloud/index.phpintments/pub/....

I assume this should be

https://my.tld/nextcloud/apps/appointments/pub/....

or so.

Did I configure something wrong? How to fix this? Thanks in advance.

@SergeyMosin
Copy link
Owner

Can you please check if the URL that appointments displays in the "Show URL/link" dialog has index.php in it or not.
Example: https://my.tld/nextcloud/apps/... vs https://my.tld/nextcloud/index.php/apps/...

image

@stefangweichinger
Copy link
Author

It doesn't:

https://my.tld/nextcloud/apps/appointments/pub/ilbkXXXYYY/form

@SergeyMosin
Copy link
Owner

Thank you. I am trying to replicating this.

@stefangweichinger
Copy link
Author

Just in case: I fiddled with settings as mentioned in (closed) #473 (comment)

I assume it's not related, just telling. Thanks.

@SergeyMosin
Copy link
Owner

Actually it might be related to embedding.

Do you have something like this in your embedding script ?

... substr($src, 0, -4) . 'cncf?d=' ...

can you make sure it is '-4' and not '4'. If possible can you send me your embedding scripts to sergey [at] srgdev.com .

@stefangweichinger
Copy link
Author

I don't know about any embedding scripts ... I only added the options (occ config:app:set) as mentioned.
I am not that competent in terms of web-development ... only following instructions here (as far as I understand them).

@SergeyMosin
Copy link
Owner

SergeyMosin commented Mar 7, 2024

I assume you are trying to embed the appointments page into an iFrame if you set emb_afad_<YourUserNameHere> and/or emb_cncf_<YourUserNameHere> vars via occ as per #473 .
In order to figure out if the problem is in the embedding part or the core part can you please clear(occ config:app:delete) both emb_afad_... and emb_cncf_... vars and try to book an appointment via not embedded URL.

@stefangweichinger
Copy link
Author

will try asap. thx

@stefangweichinger
Copy link
Author

did that, reloaded page, republished appointments-page

Sry, same error:

https://my.tld/nextcloud/index.phpintments/pub/ilbkZrMAbQ==/cncf?d=1XvNN%2B7M03HnBuq53kTo4XaNd5...

@SergeyMosin
Copy link
Owner

Thank you.

@SergeyMosin
Copy link
Owner

I can not replicate this. When you get a chance can you please send me ( sergey [at] srgdev.com ) the Settings Dump of the page
and can you also check if occ config:app:get core defaultpage outputs anything

Settings dump location:
image

@stefangweichinger
Copy link
Author

PM sent. Thanks.

@stefangweichinger
Copy link
Author

Just updated and tested again: works now for me! Thanks!

@SergeyMosin
Copy link
Owner

FYI: The error was actually caused by IRequest->getRequestUri() ( https://nextcloud-server.netlify.app/classes/ocp-irequest#method_getRequestUri ) , which is a part of the core API. I was able to replace this function call, but there are other places in NC code that use this function.

@xprofiler
Copy link

Can you please check if the URL that appointments displays in the "Show URL/link" dialog has index.php in it or not. Example: https://my.tld/nextcloud/apps/... vs https://my.tld/nextcloud/index.php/apps/...

image

Only a note, because I found this issue while having the problem, that the links in the confirmation mail were broken:
I am using the appointment form as an iFrame in another website. After changing the configuration to use pretty URLs described here, I forgot to update the iFrame URL on my website. It was showing correctly, because the link was working with and without index.php in the URL string. Only the confirmation mails were containing wrong URLs with are resulted in page-not-found errors.
Thanks for the hint to the appointment URL!

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

No branches or pull requests

3 participants