Skip to content
This repository has been archived by the owner on Dec 28, 2020. It is now read-only.

[BUG] Page "register/abort" not found #60

Open
freimaks opened this issue Oct 6, 2020 · 0 comments
Open

[BUG] Page "register/abort" not found #60

freimaks opened this issue Oct 6, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@freimaks
Copy link

freimaks commented Oct 6, 2020

Smartphone / Desktop: Desktop

  • NodeBB version: 1.14.3
  • NodeBB git hash: (git rev-parse HEAD)
  • Device: PC
  • OS: Windows 10
  • Browser: Vivaldi

Describe the bug
Page for abort registration does not work.


Additional context / Screenshots
File registerComplete.tpl from nodebb-theme-persona has special form for cancel registration:

<form role="form" method="post" action="{config.relative_path}/register/abort">
	<p class="text-center">
		<button class="btn btn-link">[[register:cancel_registration]]</button>
	</p>
</form>

File registerComplete.tpl from nodebb-theme-oxide has only link to register/abort. And this link get page 404.
To correct this error, we can simply return a separate form for aborting registration:

<form role="form" method="post" action="{config.relative_path}/register/complete/?_csrf={config.csrf_token}" enctype="multipart/form-data">
	{{{each sections}}}
	<div class="row">
		<div class="col-xs-12 col-sm-8 col-sm-offset-2">
			<div class="panel panel-default">
				<div class="panel-body">
					@value
				</div>
			</div>
		</div>
	</div>
	{{{end}}}

	<div class="row">
		<div class="col-xs-12 col-sm-8 col-sm-offset-2">
			<button class="btn btn-primary btn-block">Submit</button>
			<!-- Remove this code
			<p class="text-center">
				<br />
				<a target="_top" href="{config.relative_path}/register/abort">[[register:cancel_registration]]</a>
			</p>-->
		</div>
	</div>
</form>

<!-- Add this code -->
<form role="form" method="post" action="{config.relative_path}/register/abort">
	<p class="text-center">
		<button class="btn btn-link">[[register:cancel_registration]]</button>
	</p>
</form>
@freimaks freimaks added the bug Something isn't working label Oct 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant