Hi,
I’ve just upgraded to 0.9.6.2 and consequently, downloaded and installed the Doc Finder Module (1.5). I’ve followed all instructions, but when I go to the module tab and select Doc Finder, it *outputs* the actual php code from the index.php file in the assets/modules/docfinder/ directory.
This is what this looks like:
[tt]4) date_default_timezone_set("Europe/Berlin"); // load Theme as seen in Doc manager $tb_prefix=$modx->db->config[’table_prefix’]; $theme=$modx->db->select(’setting_value’, ’`’ . $tb_prefix . ’system_settings`’, ’setting_name=\’manager_theme\’’, ’’); $theme=$modx->db->getRow($theme); $theme=($theme[’setting_value’] <> ’’) ? ’/’ . $theme[’setting_value’] : ’’; // load text direction as seen in Doc manager if(isset($modx->config[’manager_direction’])) $dir=($modx->config[’manager_direction’] == ’rtl’ ? ’dir="rtl"’ : ’’); else $dir=""; // load lang as seen in Doc Manager $lang=$modx->config[’manager_language’]; // define search places $id="DocAndTVV"; $name="Documents"; $searchPlacesArray[$id].....[[/tt]
Has anyone seen this before?
Yes
here. It seems that the Doc Finder and MODx 0.9.6.2 don’t work so well together.
At least not in my case. I haven’t been able to find out what’s wrong yet.
I think, thererfor I am! But what I am, and why...?
I just installed it in 0962 with no problem.
It seems that the code is breaking for you after the php version check. What do you get as a result for intval(substr(phpversion(), 0, 1));
Hello everyone,
strange behavior indeed. It looks like the PHP code is not executed but displayed as plain text. Sylvaticus, you had this problem with one installation of 0.9.6.1 too, isn’t it? Did you find a solution?
Thanks,
Bogdan
-
☆ A M B ☆
- 24,524 Posts
It looks to me like a line ending problem (which will depend on the platform the item was written and archived on); I’ve had this happen before in .php files and .js files. The files had no line endings (or at least the platform the script is running on doesn’t recognize whatever is there), so everything got run together, including single-line comments (in effect, the first single-line comment never ends, so the entire rest of the script is one big comment). In my case, it was a configuration of my FTP client. I’m using a different client now, and haven’t had it happen for a long time.
That’s an excellent tipp Susan, thanks! Maybe a reason not to use single-line comments for distributed code?
@sderuiter: Is it a windows machine you tried to install Doc Finder on?