View Issue Details

IDProjectCategoryView StatusLast Update
0013746phplist applicationConfigurationpublic29-04-11 15:22
Reporterjudgej 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.10.5 
Target Version2.10.13Fixed in Version2.10.14 
Summary0013746: Configuring a 'website' value not in a root folder hides other config settings
DescriptionBest view the description and the solution here:

http://forums.phplist.com/viewtopic.php?t=12099

The file in question does not appear to have been touched in 18 months, so I'm guessing the next release would still contain the problem.
Additional InformationTO reptroduce:

1. Install PHPlist in a folder, e.g. http://www.example.com/mysitename/myinstance

2. Set the 'website' in the config screen e.g. www.example.com/mysitename/myinstance

3. Try editing any of the config values. They will all appear blank.

4. Apply my fix, and they will come back.
TagsNo tags attached.

Activities

h2b2

29-04-10 06:14

manager   ~0050978

From judgej in http://forums.phplist.com/viewtopic.php?p=45240#p45240

==== Start Quote ====
The config screen does a substitution of the 'website' variable into all config values before displaying them in the edit forms. If the website just so happens to contain '/' characters, i.e. the website is in a sub-directory rather than the root directory, the extra '/' causes the string substitution to go too far and it blanks out the value.

The solution is in admin/configure.php, lines 64 and 65, which read as follows in PHPlist 2.10.5:

Code: Select all
        $value = preg_replace('/'.$domain.'/i','[DOMAIN]', $value);
        $value = preg_replace('/'.$website.'/i','[WEBSITE]', $value);



They should read:

Code: Select all
        $value = preg_replace('/'.preg_quote($domain, '/').'/i','[DOMAIN]', $value);
        $value = preg_replace('/'.preg_quote($website, '/').'/i','[WEBSITE]', $value);

==========
I've now noticed on this config page, that editing some customised fields will revert the field back to the default value, ignoring the customised version.

For example, I customised the unsubscribe page, and can see the customised text, but when I go back to change it a little more, I am presented with the pre-customised default text.

-- Jason

Fixed: inserting this line at admin/config.php line 54:

Code: Select all
    $dbval = getConfig($id);



It is added just before or after the:

Code: Select all
    $val = $default_config[$id];

===== End Quote =====

michiel

29-04-11 15:22

manager   ~0051203

http://phplist.svn.sourceforge.net/phplist/?rev=2669&view=rev