Please am having this problem when the site is on example.com/upload_folder/web/ and I set the agreement url to be /upload_folder/web/ agreement

On edge says "Hmmm...can’t reach this page", on opera "This page isn’t working example.com redirected you too many times. ERR_TOO_MANY_REDIRECTS" and on chrome "This page isn’t working example.com redirected you too many times. Try clearing your cookies. ERR_TOO_MANY_REDIRECTS"

I have the redirect feature on cpanel actiavted, to redirect example.com/upload_folder/ to example.com/upload_folder/web since drupal actual files are in the folder "web"

When I use /agreement displays the existing agreement terms of use agrement on the site at https://example.com/terms-of-use-agreement/ which is not even related and has a totally different use terms.

Error log reports:

when the user tries to login "page not found 10/31/2019 - 03:12 /projectdin/web/terms-of-use"
when admin is saving the agreement page setting "php 10/31/2019 - 03:11 Warning: call_user_func_array() expects parameter 1 to…"

the full admin error prints:

Location 	https://example.com/upload_folder/web/admin/config/people/agreement/manage/term_of_use?destination=%2Fprojectdin%2Fweb%2Fadmin%2Fconfig%2Fpeople%2Fagreement

Referrer 	https://example.com/upload_folder/web/admin/config/people/agreement/manage/term_of_use?destination=/projectdin/web/admin/config/people/agreement

Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in Drupal\Core\Form\FormValidator->doValidateForm() (line 282 of core/lib/Drupal/Core/Form/FormValidator.php).

    Drupal\Core\Form\FormValidator->doValidateForm(Array, Object) (Line: 238)
    Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'agreement_form') (Line: 118)
    Drupal\Core\Form\FormValidator->validateForm('agreement_form', Array, Object) (Line: 576)
    Drupal\Core\Form\FormBuilder->processForm('agreement_form', Array, Object) (Line: 319)
    Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 93)
    Drupal\Core\Controller\FormController->getContentResult(Object, Object)
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'validatePath' not found or invalid function name in Drupal\Core\Form\FormValidator->doValidateForm() (line 282 of core/lib/Drupal/Core/Form/FormValidator.php).

    Drupal\Core\Form\FormValidator->doValidateForm(Array, Object) (Line: 238)
    Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'agreement_form') (Line: 118)
    Drupal\Core\Form\FormValidator->validateForm('agreement_form', Array, Object) (Line: 576)
    Drupal\Core\Form\FormBuilder->processForm('agreement_form', Array, Object) (Line: 319)
    Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 93)
    Drupal\Core\Controller\FormController->getContentResult(Object, Object)
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Any direction on this will be appreciated

Comments

ojchris37 created an issue. See original summary.

ojchris’s picture

Issue summary: View changes
ojchris’s picture

Title: URL when root is Subfolder » The right URL when root is Subfolder
Issue summary: View changes
mradcliffe’s picture

Category: Support request » Bug report
Status: Active » Needs review
StatusFileSize
new617 bytes

Yes, I think this is a bug. It is expected that this would work when Drupal is installed in a sub-directory. I think if I concatenate the agreement path to the base path from the request, then that should resolve the issue.

Let's see if this passes tests, but could you try and apply the patch here to see if it resolves the issue?

mradcliffe’s picture

StatusFileSize
new1.91 KB
new1.17 KB

Found a couple of issues including the validation issue @ojchris37 reported in the first comment.

ojchris’s picture

thank you for the follow up. Which of the patch to test? what to do with the txt file in #5?

mradcliffe’s picture

Use the patch in #5. The text file is known as an interdiff. t shows the changes between 2 patch files. You can ignore this file.

mradcliffe’s picture

Were you able to apply the patch in #5, and see if that worked for you, @ojchris37?

ojchris’s picture

Status: Needs review » Fixed

@mradcliffe the patch resolved it, works now BUT the tab http://sitemy.com/web/admin/config/people/agreement/agreements does not indicate what user has accepted the terms with a good marker, everything remains X.

Also where do I go to change the success text "Thank you for accepting our agreement" to something else. I wouldn't mind hard coded change in the interim

ojchris’s picture

Status: Fixed » Needs work

The marker indication is important I realize

ojchris’s picture

Issue summary: View changes

  • mradcliffe committed 7d78fb4 on 8.x-2.x
    Issue #3091300 by mradcliffe, ojchris37: Fixes using agreement when...
mradcliffe’s picture

Status: Needs work » Fixed

Thank you for confirming that the patch works and reporting the issue! I've committed to the development branch of Agreement 8.x-2.x-dev. I should be rolling an actual stable release shortly.

Also we usually create new or follow-up issues for unrelated bugs or feature requests. It helps to declutter and focus an issue. I created #3094948: Agreement Records view not displaying agreed checkmark to look into the Agreement Records page not showing check marks. However I have not been able to reproduce this manually so far.

A Agreement success, confirmation and revocation text can be configured by going to Administration > Configuration > People > Agreements, clicking the Edit button for the agreement you wish to configure, and then these are listed underneath the "Settings" fieldset. This is collapsed by default for me when using the Claro theme.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.