RoboJackets / RoboJackets/apiary

Illuminate\Database\QueryException in GET /nova-api/dues-transactions

Open
#1,663 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type / bug
Dominant language
PHP
Stars
20
Forks
8
Avg merge
16h 19m
Merged PRs (30d)
29

Description

Error in Apiary

Illuminate\Database\QueryException in GET /nova-api/dues-transactions
SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'id' (SQL: select count() as aggregate from (select dues_transactions., dues_transactions.*, dues_transaction_merchandise.merchandise_id as pivot_merchandise_id, dues_transaction_merchandise.dues_transaction_id as pivot_dues_transaction_id, dues_transaction_merchandise.provided_at as pivot_provided_at, dues_transaction_merchandise.provided_by as pivot_provided_by, dues_transaction_merchandise.created_at as pivot_created_at, dues_transaction_merchandise.updated_at as pivot_updated_at from dues_transactions inner join dues_transaction_merchandise on dues_transactions.id = dues_transaction_merchandise.dues_transaction_id left join payments on payments.payable_id = dues_transactions.id and payments.payable_type = dues-transaction and payments.deleted_at is null inner join dues_packages on dues_packages.id = dues_transactions.dues_package_id...

View on Bugsnag

Stacktrace

app/Http/Middleware/CASAuthenticate.php:100 - App\Http\Middleware\CASAuthenticate::handle

View full stacktrace

Created by RoboJackets Admin via Bugsnag

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the GET /nova-api/dues-transactions request and the duplicate id SQL shown in the report, then inspect the query path associated with app/Http/Middleware/CASAuthenticate.php:100. Reproduce the request if possible and trace where dues_transactions is selected twice; done means the endpoint no longer raises the duplicate-column error.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.