I am currently updating a quite old site to the newest core version. Therefore the old CompanyDirectory module of course also needs to get upgraded.
I was unable to import the data from the old version into the new (the data was imported into the database, however was never displayed in the module admin page even after several attempts, preparing custom fields, etc. — even though it was readable at the front end ) ... however, I decided to relaunch the site completely from scratch (the customer is, luckily, fine with that too and actually the count of items is not that much (just like twenty)).
So, it's all vanilla, completely the latest release and using PHP7.2.
I figured already that this new version of CompanyDirectory must be a sort of major rewrite, alone by the version numbers (going straight from 1.23.12 to 1.900 - I am using the 1.907). Also by the lengths and contents of the module help page I can figure that the possible functionality must be huge, although I already would've been totally happy with what I had back then with 1.22.7.
So, after a few bumps from scratch (if you are interested, I'll attach that under my question) I am currently running into a (probably very minor) problem, but can't think of a way to fix it:
When I click the link to the details page of one entry, it works like a charm without url_rewriting enabled. The link is just ugly like www.example.com/index.php?mact=CompanyD ... returnid=4
With the old module I had a link like www.example.com/entry-name.html
The new version does create a link exactly like the old version did - but it returns a #404.
I do have the detail page set up, with a detail page template of CompanyDirectory as content, and I do have the hint in the logic field of the referring page like this here:
Code: Select all
{cms_module_hint module=CompanyDirectory categoryid='5' detailpage=detailansicht summarytemplate='cms_template:cd__summary_listing'}
Now I can't think of further ways how to pass the info and I do think, that the module would present the proper details template if it knew how to actually do that. If I call the URL of the details template page (which is not a public URL but only used by the module) I do get all the information including all the custom fields, but of course — of all the entries...
Can you explain briefly to me, where I shall set the link/name/id/alias of the details page, so the system can puzzle together the $id+details page/template?
Thank you very much!
===
As promised before:
Most probably all the possibilities are what's cracking my head and why I can't find the particular information I need - for example about the usage of templates:
Earlier they were simply integrated inside the CompanyDirectory module and with the included examples really a total no-brainer. Now all I was able to find regarding 'templates' were the files in the module file folder — and eventually I was able to get some into the design manager and get them running ... what took me a while though.
Before that I had another try by copying template files into the assets/module_custom/CompanyDirectory folder as described in the module help and also the official documentation here, but that did not work out for me. The templates were simply never used (frontend templates only though).
I guess that the process of working with the design manager and/or template files int the assets/module_custom folder referring to cms_template:xxx or whatever else is a very CMSms-basic-thinking. However, I'd like to propose to document this in the help page of future versions for those not so familiar with CMSms? Perhaps a link to the cmsmadesimple.org regarding such basics was suitable too?
I think working with CMSms is very quick and easy - but this new way with module-specific templates without examples and without further help is actually complicated and lenghty, I'd say.
===
What gives me the next headache is that I can't manage to get the lat:lng information saved. If I enter the digits like I receive them from google maps (like 52.516283, 13.377909), the field turns red and requires a "number". If I'd use a comma, it returns "Invalid lat/long passed to CompanyDirectory\Company::__construct". If I use the arrows of the field I get the same error. I can't tell if that is a bug ... but right now it is not functioning for me.
I guess I'll look once more into that custom admin template if I can alter the field there, but apparently this field and it's function was untested.
===
Finally my last proposal is about the picture upload. The earlier version did not require to upload the file into the file system to then copy an instance into the idX-folder. The file was selected from my hard drive and uploaded directly without step in between. Now this may be a thing of the file manager; couldn't tell. However, working with new entries is upload-to-temporary->select-file->copy-to-final-location, which takes longer and stacks unnecessary duplicate files. No biggie though - only not-typical for CMSms, as far as I could say.