I selected and added a view in the field and then I got the following error at the bottom of the page:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM node node WHERE (( (node.status = '1') )) LIMIT 5 OFFSET 0' at line 1

Comments

damiankloip’s picture

Do both of your views work correctly independently of each other? I'm not sure this is an issue with this module. What views version etc... are you using?

DrupalDan’s picture

Hi damiankloip, thanks for your message. Yes, both views work great independently. The version of views is 7.x-3.3+103-dev. Please let me know if you need any more details.

DrupalDan’s picture

I tried to use the views 7x-3.3, but that didn't bring any change. Eager to know how to fix this...

damiankloip’s picture

Can you export your two views and upload them here. I'll take a look.

DrupalDan’s picture

Hi damiankloip, thanks for your response. Sorry but I don't know how to export views. I searched on that but found nothing very helpful. Is there any instruction on that? I'm happy to try whatever needed to fix it.

damiankloip’s picture

On the main views listing page if you click on the dropmenu (where is says 'edit' by default), you should see export there. You can then copy this code into a file and post on a comment as an attachment. Hope this helps.

Are you using the most recent versions of views (I think you are) and this module? Is the child view using arguments?

DrupalDan’s picture

Hi damiankloip, sorry for late reply. I create two new views and they work with each other well and that error message is gone.

The version of modules I'm using is as follow:

Views: 7.x-3.3+127-dev
Views Field View 7.x-1.0-rc2+3-dev

The child views got no argument; I just added some filters under Filter criteria.

I compare those two sets of views, and I think there is no any difference except the number of blocks under the child view. For example, I added more than 5 blocks for view used as child and when that's embed into the parent, the error happens, but the new child view just got 2 blocks and it works great. I don't know if that makes any sense or if it is relevant. I will test the new child view by adding more blocks and let you know if there's something wrong.

Thanks for everything!

damiankloip’s picture

Status: Active » Postponed (maintainer needs more info)

No problem! If you have solid step to reproduce and this this is a genuine bug, let me know. It might not be an issue with this module in particular.

damiankloip’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)
vacilando’s picture

Version: 7.x-1.x-dev » 7.x-1.2
Priority: Normal » Minor
Issue summary: View changes
Status: Closed (works as designed) » Active

Bitten by the same.

To reproduce, just add one view as a field -- and no other fields.

I suspect that at least one node field is required because it's a view of content. Workaround - add some node field (e.g. Nid) and exclude it from display.

I wonder, is there a proper solution, or at least a more elegant workaround?

damiankloip’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
giupenni’s picture

Same as #10

damiankloip’s picture

Is this not something like removing all fields, but leaving the sorts or filters for the node in place? If so, this could be a views problem. Do you see the same problem with all field removed? I.e. no views field either?

giupenni’s picture

The problem is present only when I add one or more views as field and no other fields. Removing or adding filter for the node in place not change the problem.
Instead if I add a field (i.e.: nid) works as I expected.

If I remove all fields, I not see the same problem.

The error is:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM node node LIMIT 1 OFFSET 0' at line 1

sjekoken’s picture

I can confirm that "Syntax error or access violation: 1064" occurs if you set up a new view (or even just a new display block) and add a global views field as the only field in the display. I can also confirm, however, that adding a nid field and excluding it from display removes the error. btw ... thanks for this module, it's a Godsend!

zahra hosseini’s picture

I encountered this problem when I want to add more than one field for a specific view! for solving this problem i added only one field at every time! I think maybe this is a bug in view and its overlay.

vladimiraus’s picture

Status: Active » Closed (outdated)

Thank you for your contributions.
Drupal 7 is no longer supported.
Closing this issue as outdated.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.