Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-07-30 17:03:40

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 252
Website

txp:password_protect not working

Hello,
I’m protecting a page with this tag, but when I compile the two fields, I get a page refresh and the login/pass dialog again, and again, and again…
4.4.1 here.

Thanks for any help

Offline

#2 2014-07-30 17:37:16

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,398
Website GitHub Mastodon Twitter

Re: txp:password_protect not working

Hi Manaus

Can you post the code (replacing the login/pass) here? Also, are you sure your browser can accept cookies (I’m not sure if the tag makes use of them)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2014-07-30 20:38:07

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 252
Website

Re: txp:password_protect not working

Sure here it is:

<txp:password_protect login="thelogin" pass="thepass" />

<div class="download">
	<txp:file_download_link id="219" class="filedownload"><txp:image id="568" /></txp:file_download_link>
	<div class="pdfdetails">
		<strong>Download</strong>
                [...]

Thanks!

Offline

#4 2014-07-31 04:46:58

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,398
Website GitHub Mastodon Twitter

Re: txp:password_protect not working

do you have the tag is a page template or an article? I’ve use the tag a number of times without any problems in articles.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2014-07-31 08:32:04

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 252
Website

Re: txp:password_protect not working

Yes it’s an article.

Offline

#6 2014-07-31 09:58:20

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,398
Website GitHub Mastodon Twitter

Re: txp:password_protect not working

Did you try?

==<txp:password_protect login="thelogin" pass="thepass" />==

<div class="download">
	<txp:file_download_link id="219" class="filedownload"><txp:image id="568" /></txp:file_download_link>
	<div class="pdfdetails">
		<strong>Download</strong>
                [...]

Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#7 2014-07-31 10:05:35

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 252
Website

Re: txp:password_protect not working

Thanks, just tried but looks like it’s not changing behaviour…
“Website returns: Private”

Offline

#8 2014-07-31 11:56:20

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,398
Website GitHub Mastodon Twitter

Re: txp:password_protect not working

Another try… I guess you know that p/l is case sensitive. Did you try to change those?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#9 2015-02-17 21:56:15

mkb
New Member
Registered: 2015-02-17
Posts: 2

Re: txp:password_protect not working

Hi Manaus,

did you find a solution for your problem?
I am facing the same problem since I updated on version 4.5.7. – it keeps telling me that I am using either a wrong username or password.

I protected a section:
<txp:if_section name=“archiv”>
<txp:output_form form=“passwort” />
</txp:if_section>

and the form simply looks like that:
<txp:password_protect login=“admin” pass=”*****” />

My diagnostics tell me, that some PHP-functions are deactivated:
pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority

Might that be the problems cause?

Very wired!

Thank you in advance!!
mkb

Offline

#10 2015-02-18 17:35:28

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: txp:password_protect not working

I’ve removed the password in the code you posted.
Those deactivated PHP functions are not causing this problem.

Offline

#11 2015-02-18 21:19:46

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,810
GitHub

Re: txp:password_protect not working

You have fancy quotes in your code. Try plain ones instead. Find this:

<txp:if_section name=“archiv”>
<txp:output_form form=“passwort” />
</txp:if_section>

…and replace with:

<txp:if_section name="archiv">
<txp:output_form form="passwort" />
</txp:if_section>

Find this:

<txp:password_protect login=“admin” pass=”*****” />

…and switch it with this:

<txp:password_protect login="admin" pass="*****" />

When I try your code and substitute the default section instead of archiv, it throws this error:

Tag error: <txp:if_section name=“default”> ->  Textpattern Warning: Attribute values must be quoted. while parsing form None on page default

Couple more things to check:

  • does your site throw a similar error when it’s in Testing mode?
  • is your passwort form a miscellaneous form?

Offline

#12 2015-02-19 20:45:35

mkb
New Member
Registered: 2015-02-17
Posts: 2

Re: txp:password_protect not working

When using the testing mode it shows (hope my translation is right):

Tag error: <txp:output_form form=“passwort” /> -> Textpattern Notice: form_circular_reference: passwort while parsing form passwort on page ***_Archiv

And when using the debug mode it shows:

Tag error: <txp:output_form form=“passwort” /> -> Textpattern Notice: form_circular_reference: passwort while parsing form passwort on page ***_Archiv
textpattern/lib/txplib_misc.php:1969 trigger_error()
textpattern/publish/taghandlers.php:305 parse_form()
textpattern/lib/txplib_publish.php:426 output_form()
textpattern/lib/txplib_publish.php:326 processTags()
textpattern/publish/taghandlers.php:3789 parse()
textpattern/lib/txplib_publish.php:426 if_section()
textpattern/lib/txplib_publish.php:339 processTags()
textpattern/lib/txplib_misc.php:2321 parse()
textpattern/publish/taghandlers.php:768 txp_die()
textpattern/lib/txplib_publish.php:426 password_protect()

Yes, my passwort-form is a miscellaneous form.

Thank you so far!
mkb

Offline

#13 2015-02-20 09:14:23

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,513
Website GitHub

Re: txp:password_protect not working

mkb wrote #288427:

Textpattern Notice: form_circular_reference: passwort while parsing form passwort on page ***_Archiv

This is caused by a “loop” in your Pages/Forms site structure somewhere. Usually, the <txp:article> tag uses a Form to render its content (Form: default unless you’ve changed it). If you have another <txp:article> or <txp:article_custom> inside that Form which also uses the default Form, you get a loop and Textpattern will show that error.

In this case, your password protect tag on the Archiv page must be referenced in such a loop, so I’d start there. Trace through your Page code and visit each Form as if you were Textpattern and see if you can find any Forms that are called inside themselves.

Feel free to post here your Page and any relevant Forms that are called if you need assistance tracking the loop down.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB