Some links in /admin redirects to frontend Subscribe page - v3.3.8

I’ve been bumping into a handful of issues on a fresh install of v3.3.8.

For starters, I’ve installed phplist dozens of times over the years. I run my own dedicated servers and cannot recall having these same issues.

I’m just going to bullet out everything, to keep it quick.

- i went to install a phplist install into a subdomain
- i first initialized the database using $pageroot='/' not realizing that the $pageroot should have been $pageroot='', instead of $pageroot='/'
- everything appeared okay, although I kept having an issue when trying to Import -> upload a CSV
- whenever I went to import/upload CSV, it kept bouncing me to the frontend subscribe page (although, the URL still read ".com/admin/?page=send&id=1&tk=..."
- i noticed that the subscribe page appeared broken.  i noticed that the template's css & links were referring to /admin/admin
- i went to update the template in config -> settings, to insert the complete URLs
- every time i went to save the templates, it kept bouncing me to the frontend subscribe page
- i went into phpmyadmin to edit the footer & header templates manually
- i went back to import the CSV, and it still bounced me to the frontend subscribe page... only it at least rendered and displayed correctly this time

…that was yesterday, and here’s today…

- after accepting that my issue was caused by initializing the database using the incorrect pageroot reference of $pageroot='/', I re-initialized the database with $pageroot='' and started over again
- everything went smoothly & import -> CSV worked correctly
- i finished configuring the setup, imported the lists
- i then went to send a test campaign email, with the default starter "Do you want to continue receiving our messages?" campaign
- upon clicking "send test", it bounced me back to the frontend "subscribe" page again
- it displayed incorrectly again, so i went back into config to update the header/footer templates
- after inserting the full reference URL(s) and clicking 'save', it again bounced me back to the frontend subscribe page
- i again manually updated the URL references in phpmyadmin
- went back to try another "send test"
- it kept bouncing me back to frontend subscribe page.  again, it displayed correctly, but did not work as expected, ie: did not send a test email

i couldn’t keep trying to debug this setup… so i took to the community forums and made this post :slight_smile:

any insight as to what i might be doing incorrectly?

You say you’ve installed in a subdomain, yet your using $pageroot="" Is that correct?

yes, correct.

well, i’m actually using: $pageroot=’’

@splaquet The important configuration fields that need to be accurate are $pageroot and the website address on the Settings page
image

If phplist is installed in the web root directory then $pageroot should be an empty string. The website address is simply the domain or subdomain.

I’m not exactly sure how I have it wrong then.

as I mentioned, I have:
$pageroot=‘’ (nothing between the 's)

and

Website Address = ‘sub.domain.com(no http(s) or trailing slash)

I’m quite certain that I have those set correctly now, and they were corrected before the database reinitialization.

@splaquet Try using developer tools in your browser to monitor the http request and response when clicking the Send test button. That might show more clearly what is happening.

Also, to be clear, you access phplist admin at sub.domain.com/admin ?

yes… accessing phplist admin via: https://sub.domain.com/admin

i went through the process with chrome developer console open, but didn’t see anything flag. that’s how i originally saw the /admin/admin yesterday, when i incorrectly used pageroot=’/’. no flags in the error console today though.

just now, for index.php & init.php, i updated/activated: error_reporting(1);

maybe that’ll shed some light?

This suggests that you have “admin” as part of the website address or $pageroot. phplist itself adds “/admin” when constructing URLs.

But you are not really explaining what is not working. Please be more explicit in which URL you start from, what action you take, then what URL you go to. Unless your website is secret, please use the real URLs.

i was saying that yesterday, when i accidentally had pageroot=‘/’, i found the /admin/admin issue in the error console.

today, i updated config to pageroot=‘’ and reinitialized the database. i assumed that’d reinstall the database from the beginning.

when I click on “send test”, it’s redirecting me to the frontend subscribe page. not only is it redirecting me, but it also is not sending any tests.

below is a quote from the second part of my original post. my apologies if i wasn’t clear on what wasn’t working…

  • after accepting that my issue was caused by initializing the database using the incorrect pageroot reference of $pageroot=‘/’, I re-initialized the database with $pageroot=‘’ and started over again
  • everything went smoothly & import -> CSV worked correctly
  • i finished configuring the setup, imported the lists
  • i then went to send a test campaign email, with the default starter “Do you want to continue receiving our messages?” campaign
  • upon clicking “send test”, it bounced me back to the frontend “subscribe” page again
  • it displayed incorrectly again, so i went back into config to update the header/footer templates
  • after inserting the full reference URL(s) and clicking ‘save’, it again bounced me back to the frontend subscribe page
  • i again manually updated the URL references in phpmyadmin
  • went back to try another “send test”
  • it kept bouncing me back to frontend subscribe page. again, it displayed correctly, but did not work as expected, ie: did not send a test email

What is the URL for this page?

and what is the URL for this page?

Also, please confirm with screenshots the values for $pageroot and for web site address.

here’s the edit/send campaign page:
https://lists.fullcirclemusicproductions.com/admin/?page=send&id=1&tk=1fbe874f116e88b07576a1f7caebdf33

here’s the subscribe that it’s redirecting me to:
https://lists.fullcirclemusicproductions.com/admin/?page=send&id=1&tk=1fbe874f116e88b07576a1f7caebdf33

…i actually just now noticed that the URLs are 100% identical. when i refresh the subscribe page i’m redirected to, it still shows the same page. when i click on the URL line and then hit return, it brings back the edit/send campaign page.

i also noticed some content in the error console, that i hadn’t noticed before.
jquery.cycle2.min.js:6 [cycle2] --c2 init–
jquery.cycle2.min.js:6 [cycle2] goto: invalid slide index: -8

i went to go find the config info, from within phplist/admin, and noticed that i still hadn’t created a subscribe page yet. so, i went to create one, hit save, and was greeted with this error in Chrome:
ERR_BLOCKED_BY_XSS_AUDITOR

thinking that i might be able to work around this error, using info i gathered from this page (https://stackoverflow.com/questions/43249998/chrome-err-blocked-by-xss-auditor-details), i tried again… but, instead of the XSS_AUDITOR error, I was again greeted with the subscribe page :confused: (I’m on MacOS, so i figured i’d try on my PC… but same XSS_AUDITOR error on PC)

i’m honestly baffled. the worst part is that this is most likely something incredibly stupid and simple… and i’m just being a waste of your time, from not paying enough attention :frowning:

@splaquet It looks like “some other software” is interfering when you submit that page, but not when you simply get the page. I have had similar odd results with anti-malware software and had to either disable it or add some sort of whitelist rule.

This is interesting: xss - Chrome: ERR_BLOCKED_BY_XSS_AUDITOR details - Stack Overflow

@splaquet Thanks for your clear descriptions of the issue. Once this is resolved, it’d be great to have specific guidance on using phpList on a sundomain in the phpList manual. You could add a paragraph to the ‘installing and upgrading’ section by editing this html page: https://github.com/phpList/phplist-manual/blob/master/ch028_installation.xhtml

would a fresh/clean database install be different than reinitializing the database?

reinitializing the database was the only component that i did differently the second time around, as opposed to a clean install.

and, even though i reinitialized the database with pageroot=’’, i still had to go in and manually update my header & footer templates. i also wasn’t able to update them from within the Settings Page. i had to manually edit header/footer via phpmyadmin.

on the settings page, it’d bounce me back to the Subscribe page every time i clicked on save (when either/or template/footer was edited). even after manually updating via phpmyadmin, even still, editing header/footer in settings still results the redirect to the frontend Subscribe page.

the error that i keep noticing is this:
Uncaught TypeError: Cannot read property ‘top’ of undefined
at phpList_ui_bootlist.min.js?v=3.3.8:4

(anonymous)	@	phpList_ui_bootlist.min.js?v=3.3.8:4
setTimeout (async)		
(anonymous)	@	phpList_ui_bootlist.min.js?v=3.3.8:4
i	@	jquery-1.12.1.min.js?v=3.3.8:2
fireWith	@	jquery-1.12.1.min.js?v=3.3.8:2
ready	@	jquery-1.12.1.min.js?v=3.3.8:2
K	@	jquery-1.12.1.min.js?v=3.3.8:2

i’ve looked around for similar issues, but everything keeps referencing ‘a deeper issue’. my other installs do not throw that error.

@duncanc, as i mentioned earlier, i have about another half dozen or so of live & working phplist installs on my servers. the only difference being that this was a fresh install, whereas the others have been upgraded over the years. this install is located on a different server, but every server has identical software installed (CentOS 7, CloudLinux7, Imunify360 w/ anti-malware)

i’m going to try fresh again, using a brand new database and uploading another fileset via ftp.

and that’s a no go. here’s what the console on the subscribe page looks like, upon failed “send test” redirect… and without manually editing the header/footer in phpmyadmin.

overall… the same results :frowning: