Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Store the application URL in application settings #1404

Closed
ginatrapani opened this Issue Nov 2, 2012 · 0 comments

Comments

Projects
None yet
1 participant
Owner

ginatrapani commented Nov 2, 2012

The Facebook token expiration email notification has incomplete URL because it's determined dynamically.

When cron runs the crawler (command-line PHP) and Facebook tokens have expired, the link in the email to re-authorize Facebook doesn't contain the installation host URL. The email looks like this:

Hi! Your ThinkUp installation is no longer connected to the Such-and-such Facebook account. That's probably normal - Facebook makes the permissions for that connection expire every 60 days, and it can also get disconnected if you change your password or other authorization settings.

The good news is, it's easy to fix. You'll just need to click on "Add a Facebook User" in ThinkUp's settings at this link:

http:///path/account/?p=facebook

This is because ThinkUp uses the following line to determine the server host part of the URL:

$server = empty($_SERVER['SERVER_NAME']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];

Those SERVER vars aren't set in command line mode.

Proposed solution: store the installation URL during installation and upgrade processes in the application settings area. If someone changes the URL of their install they'd have to update this setting, which means it should probably show up in the Application Settings area for updating.

anildash added a commit to anildash/ThinkUp that referenced this issue Jan 7, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment