2

I have a comments listing view. When I make the the row style as comments everything is displaying fine. But when I make the row style as fields and add the comment:comment field to the list, the comment body is not showing up.

Things I have checked

  1. There is no field access for this field.
  2. The field is using the default template, so it is not being overridden.
  3. Checked the body field display settings, it is configured to show and format plain text is enabled.
  4. I am previewing the view as admin so there should be no access concerns as well.
  5. The view is showing other fields normally.
  6. "Exclude this display" box unchecked.
  7. Changed the theme to Bartik and also disabled the javascript to be double sure.
  8. Comment related modules I have are ajax-comments and onecomment module. I disabled both, rebuilt permissions and cleared the cache :)
7
  • can you post a screen shot of your view edit? It's only the body? so is other things like author, comment post time, etc... showing up?
    – No Sssweat
    May 30, 2015 at 10:27
  • All other fields are showing up. The issue is only with the comment body.
    – Gokul N K
    May 30, 2015 at 10:28
  • When you click on the comment:comment field, is "Exclude this display" box unchecked?
    – No Sssweat
    May 30, 2015 at 10:30
  • Yes @NoSssweat ;) That was the first thing I checked :P
    – Gokul N K
    May 30, 2015 at 10:35
  • Please check the view export here gist.github.com/nkgokul/d7cb45e048445fe83587
    – Gokul N K
    May 30, 2015 at 10:43

2 Answers 2

0

Sometimes permissions are declared as constants... and sometimes constants are declared this way:

define(MY_MODULE_PERMISSION,'My module permission');

Depending on the PHP configuration the name of the constant will be assumed as 'MY_MODULE_PERMISSION'... but not always.

Using this constant in hook permission will lead you to very weird problems. Check your custom modules and make sure you declare constants with its name as string, like this:

define('MY_MODULE_PERMISSION','My module permission');

Hope that helps.

PD: The code which I'm referring worked fine on Acquia but throw problems on Platform.sh. You can imagine how difficult it was to find the culprit.

0

Well.. at this point you may have to resort to the following.

First of all, make a backup of your database.

Plan A) Disable views and uninstall it (so all the database tables are erased), then delete the views folder. Download it again, upload the folder and enable it. If this fixes your problem, you can use the view's export/import to quickly import all the view's you had.

Plan B) Disable every module you have in sites/all/modules folder except for Views. Then if it works now, enable them one by one to see which one is causing this.

Plan C) If A or B doesn't work, well... I hate to say it, reinstall Drupal :(

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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