Taking over a legacy Concrete 5 site... should it be structured like this? And why are those things broken?

Permalink
I've been asked to help out a local tourism website where the original developer has gone off to do other things. Normally I work with Wordpress and Drupal, but I was excited to have a go at learning Concrete 5.

So, my first challenge is 'when I edit (not create) events, the existing event record goes blank'. And the next one is 'when I edit an accommodation provider and change a dropdown, the record goes blank'.

So, I turned on logging and debugging, and started with the C5 documentation, and it doesn't seem to reflect what I'm seeing in my database. I am confused.

In the database I have one monster 'Accommodation' table, containing ALL the accommodation fields - 'locality' 'description', 'honeymoons' 'acceptsdogs' 'wifi' 'latitude' 'longitude' 'prices'. No version control, no dates - everything in the one table. Same with the 'Events' and 'Places'

I do have some page types set up and they seem to distribute page content across multiple tables in the way I was expecting a CMS to do, but these Accommodation, Event and Place records seem to be different.

Looking at the forms that have been reported as malfunctioning, they are each in their own 'packages' folder, and they seem to have the entire editor form laid out in HTML/php in a location like : packages\tpwgd_im3\single_pages\dashboard\tpwgd_im3.php They update using a function embedded into that page.

Should I be riffling through the documentation to find references to packages used in this way - or does this sound like someone has manually created a table and a bunch of fields in MySQL, and has just embedded a custom form for editing them within the main Concrete interface? So, problems with it are likely to be the custom code, not the Concrete?

Any tips or background info that I am missing very gratefully received. Nothing is showing in the C5 logs or debugging info at all.

cycas
 
Steevb replied on at Permalink Reply
Steevb
Url and C5 version might help, plus a bit of the 'Environment' would be good.
cycas replied on at Permalink Reply
cycas
The URL ishttp://www.dartmooraccommodation.co.uk/... - however, the problems are with editing content and are not visible on the public site. Items from the 'Event' package which loses data on editing is displayed here :http://www.dartmooraccommodation.co.uk/whats-on/september/...

The version is currently 5.5.1.

Environment report says:

"# concrete5 Version
5.5.1

# concrete5 Packages
AddThis (1.0), Breadcrumbs (2.0), Designer Content (3.0.2), Manual Nav (1.3), PHP block by ND (1.0), Quick Links (1.1.2), Simple Image Gallery (1.1.3), Thumbview Template (1.1.1), TPWGD Accommodation Management System (1.0), TPWGD Event Management System (1.0), TPWGD Place Management System (1.0).

# concrete5 Overrides
blocks/event, themes/DA

# Server Software
Apache/2.4.9 (Unix)

# Server API
cgi-fcgi

# PHP Version
5.3.28

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, intl, ionCube Loader, json, ldap, libxml, mbstring, mcrypt, mssql, mysql, mysqli, mysqlnd, OAuth, odbc, openssl, pcntl, pcre, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, SQLite, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend Guard Loader, zip, zlib.

# PHP Settings
log_errors_max_len - 1024
max_execution_time - 5
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 64M
safe_mode - Off
safe_mode_exec_dir - <i>no value</i>
safe_mode_gid - Off
safe_mode_include_dir - <i>no value</i>
sql.safe_mode - Off
upload_max_filesize - 64M
ldap.max_links - Unlimited
mssql.max_links - Unlimited
mssql.max_persistent - Unlimited
mssql.max_procs - Unlimited
mssql.textlimit - Server default
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
safe_mode_allowed_env_vars - PHP_
safe_mode_protected_env_vars - LD_LIBRARY_PATH


Thanks for looking!
chemmett replied on at Permalink Reply
chemmett
Depending on the functionality, it can be pretty normal for packages in Concrete5 to create their own database tables and create their own admin pages in the dashboard. The "TPWGD * Management System" packages are custom, I'm sure written by the original developer, and the tables you mentioned are almost certainly associated with them, as they're not C5 tables.

From a couple of things like the database description and the fact that the update code was in the single page script instead of in a controller, I'm guessing these weren't particularly well written, and I would definitely look in those packages first for the problem. I would copy the site and DB to a development server or machine and turn on PHP error reporting to track down the problem. C5 tends to hide errors, even from being inserted into server log files, when in production mode.

Hope that helps!
cycas replied on at Permalink Reply
cycas
That's really helpful, thank you. I had no hand-over and no documentation. :-(

My instinct based on other platforms is that fixing the buggy custom code might actually be slower than building a basic events listing as a Page Type, but I'll try setting up a test site and see what I can spot in the logs first.