Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occured while communicating to the server. JTable + ORM #2265

Open
belenmolina1 opened this issue Dec 11, 2021 · 1 comment
Open

Comments

@belenmolina1
Copy link

belenmolina1 commented Dec 11, 2021

Hello! I have the following situation:
My idea is to be able to take data from a table, display it in the front end with JTable.
What I need is to be able to make the connection using ORM, that is Doctrine.
When I make the query to the table, it brings me the data, it prints them JSON, but it does not insert them in the table and it emits the message "Error
An error occured while communicating to the server."

Could you give me a hand?

Controller

image

JTable
image

Model

image

Front
image

@sheryever
Copy link
Contributor

Correct your code in function tableform() function

Correct
$jTableResult['Records'] = $contact->findAll();

You don't need
$data['contact'] = $contact->findAll();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants