2

When I go to CiviCRM >> Administer CiviCRM >> Profiles it is blank. How do I correct this?

I am running CivCRM 4.7.22 on Joomla 3.6.4. I have cleared caches and rebuilt the menu. There are no javascript errors in console. I can add profiles when I edit contribution pages. I can edit and create profiles when setting up contribution pages. I need to go to CiviCRM >> Administer CiviCRM >> Profiles because according to my research that is where the settings are to add reCaptcha to profiles.

UPDATE: There are not any errors (404 or otherwise) in the Network tab of the browser dev tools. Below is an image of what I mean by blank. enter image description here

  • Could you please post a screenshot in case there's a clue? "Blank" can meet a few different things. Also, is there anything in the ConfigAndLog? What about 404s in the Network tab of your browser's dev tools (F12)? – Jon G - Megaphone Tech Aug 9 '17 at 5:19
  • I'm using Wordpress so Joomla may be different but Profiles in my case is under Administer>Customize Date & Screens>Profiles. There you should see User-defind profiles and Reserved Profiles. That is unless you've customised your navigation menu. – peterb Aug 9 '17 at 10:30
  • Seeing this on live sites running Drupal and Wordpress. Debain OS, latest versions of Civi and CMS. No errors. Certain pages are blank. delete templates_c/* and it works again... until the next time. permissions on new folders are 751 and 644 for files. owner and group is www-data... May need to re-frame this as a new question. – Darren Dec 8 '17 at 17:31
0

That's a headscratcher for sure. Here are some things to try:

  • Review the log at ConfigAndLog just after you load the Profiles page.
  • I've seen this happen when your Resource URLs and directories aren't set properly. Check both: Administer » System Settings » Resource URLS and Administer » System Settings » Directories.
  • Check the HTML to see which div is missing compared to the demo site. Knowing that will help someone who wants to look in the source code.
  • You said you cleared caches - I assume that include removing templates_c. If not, please delete that. Also check the permissions on templates_c to make sure this isn't a permission error on the compiled template.
| improve this answer | |
  • Your answer has opened some new ways to look at this. What should the permissions be on templates_c? In Resources and Directories, I just have the standard short codes in place. Should they be set to something specific? If so, where is the best place to set them? The div is <div id="crm-main-content-wrapper"> </div> It is there, but it is empty. – ermSO Aug 9 '17 at 21:44
  • I'm surprised that crm-main-content-wrapper is empty but there's nothing in the ConfigAndLog log? It's not important what the resources and directories values are, so long as they match (on Resource URL/path). templates_c just needs to be writable by the web server user (usually www-data on Debian/Ubuntu derivatives, httpd on Red Hat and derivatives). If it's NOT writable, that will show up in ConfigAndLog logs. – Jon G - Megaphone Tech Aug 10 '17 at 15:59
  • There is nothing in the ConfigAndLog files. I am pretty sure that the Resource URLs and Directories are set correctly because the rest of the site works. The templates_c directory appears to be accessible because other files are being written there. Where would I go to start looking in the code or HTML? Because there are not any errors in the ConfigAndLog files, could this be a database issue (like something not set correctly) and then whatever query returns empty? – ermSO Aug 28 '17 at 21:52
  • Possible, but if so that's a bug - SOMETHING should show up. To go looking in the code/HTML, I would turn on Debugging/Error Handling, then load the page, appending &smartyDebug=1 to the URL. You should get a list of PHP variables that were passed to the Smarty template. Compare that to a working site (e.g. dmaster.demo.civicrm.org/civicrm/admin/uf/…). It's likely that variables aren't getting populated. Based on that, you can look at the files templates/CRM/UF/Page/Group.tpl and CRM/UF/Page/Group.php. – Jon G - Megaphone Tech Aug 29 '17 at 1:01
  • I did the Smarty comparision with the following site: joomla.demo.civicrm.org To my untrained eye, the only variable that was suspiciously different was {config}. In the demo site, the {config} starts out with CRM_Core_Config Object (117) and then list a bunch of info. In my site, {config} is CRM_Core_Config Object (0) and lists nothing. Is that an issue? – ermSO Aug 29 '17 at 15:37
0

The fix was to manually delete the templates_c directory. Apparently, there were directories that the Debug mode delete method was not able to delete. Some of those directories just happened to be the ones that contained the corrupted joomla.tpl compiled template and possibly other corrupted compiled templates were involved. Also, there seemed to be an issue with Smarty overwriting the compiled template when I changed the normal/uncompiled joomla.tpl code. Everything works now.

| improve this answer | |
  • I'm seeing this issue on a couple of live sites one Wordpress and one Drupal, but both are on hardened Debian 7 OS. Deleting templates_c/* does resolve the issue, but does not fix the root cause. Can you confirm if this is still happening? We really need to find the root cause if possible. The owner and group are www-data with rwxrwx--- or 770 permissions (directories have X). The system umask is 0022. We may need a new question requesting the root cause? – Darren Dec 8 '17 at 17:22
  • Newly created folders have 751 and new template files have 644 (owner and group are www-data). – Darren Dec 8 '17 at 17:29
  • If you try to delete the templates_c directory with Debug command, you most likely will need 755 permissions on templates_c directory. I believe Smarty recommends 755 on templates_c so that Smarty functions correctly. Some times hardening makes automated tasks like updating impossible without manually doing it. – ermSO Jan 5 '18 at 20:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.