castlamp / zenbership

(2015) Zenbership Membership Software: Achieve Membership Nirvana
Other
112 stars 58 forks source link

entire URL path system is broken #185

Open abshkd opened 6 years ago

abshkd commented 6 years ago

I edited your sd-system/config.php and added https://domain/panel where panel is the subdirectory I edited the URL in options to add https.

The result

  1. zenbership still uses http and will go into redirect loop
  2. the top navigation links for cart/shop etc dont even work for some reason it always uses the FQDN and completely ignores the actual path. So even if I accept the non SSL url as the only way to use this, I am still stuck with broken links

I am assuming I am doing something wrong but this would be one of over thousands of php cms installs I have done. First time with zenbership and it appears to be unusable from the start. Understand its Beta but this is very basic stuff

Redacted99 commented 6 years ago

Don't know if this will help, but I had similar errors when I had installed the files in the /var/www/html/zenbership folder. When I moved them up one level (installing in /var/www/html) everything worked fine (and under https).

abshkd commented 6 years ago

@Redacted99 Thank you. I figured that workaround is the last resort. Have you gotten https working?

nsitu commented 6 years ago

I've also got zenbership installed in a subfolder, and am facing issues with broken links. (e.g. standard menu items go to the wrong page). I gather that at the moment zenbership assumes that it will be installed in the root folder. This makes it unusable in my case. Hoping this isn't too hard to solve.

Redacted99 commented 6 years ago

You could go into the admin page, content/menu and change the link URL's if the menu links are your only problem

nsitu commented 6 years ago

I found a temporary fix for the menu items by editing /admin/cp-classes/widget.class.php The problem lies in the build_link function, which begins around line 427. There appear to be 3 "Link Types" defined here: 1 = cms page, 2 = full url, 3 = onsite build url In the case of type 2 (Full URL), it attempts to do this: $item['link'] = str_replace('%pp_url%',PP_URL,$item['link']); However, this does not work, as it relies on the presence of '%pp_url%' in the link string. By default these strings only include single slash as a prefix, which has the effect of making them bypass whatever subfolder Zenbership is installed in. E.g. I have Zenbership installed at http://website.com/zen, but all these links would point to http://website.com/calendar.php instead of http://website.com/zen/calendar.php as expected. Anyway, The following worked as a fix for the menu items: $item['link'] = PP_URL . $item['link']; However, I'm not clear on the broader implications of doing this. It may very well cause problems elsewhere. Also, @Redacted99 , regarding this:

if the menu links are your only problem

The menu links are not the only problem. I have found that some links attempt to go to https:// instead of http:// I'm in the middle of getting an SSL Cert sorted out, which may mitigate the issue, but I do think in general Zenbership ought to be deriving urls consistently from the same place, rather than assigning them arbitrarily.

jbelelieu commented 6 years ago

@Redacted99's solution will resolve issues with menu links. Simply edit the menus to include the full URL to the page.