Hello

I developer app sell product, in my site, I don't install "comment" module. In my app, when navigate to view node, console log show error : 404 (Not found : Could not find resource comment.) and don't show any field.

How to fix it.

Comments

tyler.frankenstein’s picture

Status: Needs work » Needs review

I think this line (https://github.com/signalpoint/DrupalGap/blob/7.x-1.x/src/modules/node/n...) should be changed to this:

if (typeof node.comment === 'undefined') {
  _drupalgap_entity_page_container_inject(
    'node', node.nid, 'view', build
  );
}
else if (node.comment != 0) {

That should do it. Please submit a pull request if that fix works, thanks!

huythuytq’s picture

I edit like above but it don't work :(.
When I edit function node_page_view_pageshow

function node_page_view_pageshow(nid) {
  try {
    node_load(nid, {
        success: function(node) {
          // Build the node display.
          var build = {
            'theme': 'node',
            // @todo - is this line of code doing anything?
            'node': node,
            // @todo - this is a core field and should by fetched from entity.js
            'title': {'markup': node.title},
            'content': {'markup': node.content}
          };
          _drupalgap_entity_page_container_inject(
        	    'node', node.nid, 'view', build
              );
        }
    });
  }
  catch (error) { console.log('node_page_view_pageshow - ' + error); }
}

It work for me

tyler.frankenstein’s picture

Category: Task » Bug report
Status: Needs review » Needs work
huythuytq’s picture

Sorry I did it wrong because some of my modules conflicted, I tested again and it works fine. I submitted a pull request.

tyler.frankenstein’s picture

Status: Needs work » Closed (duplicate)

Excellent, thank you. I will merge your Pull Request ASAP: https://github.com/signalpoint/DrupalGap/pull/431