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

Error Showing Requested Assets #13276

Closed
2 tasks done
brianhoganm opened this issue Jul 10, 2023 · 9 comments
Closed
2 tasks done

Error Showing Requested Assets #13276

brianhoganm opened this issue Jul 10, 2023 · 9 comments
Assignees

Comments

@brianhoganm
Copy link

Debug mode

Describe the bug

When I click on Requested I get a 500 Error message. I enabled the debug mode and I get the following message:

Attempt to read property "id" on null (View: C:\inetpub\wwwroot\SNIPEIT\resources\views\hardware\requested.blade.php)

I am not sure what is going on. Everything was working fine before I updated to version 6.1.2.

Reproduction steps

  1. Click Assets
  2. Click Requested

...

Expected behavior

When clicking Requested, I should be able to view items that have been requested by users.

I was looking foward to the new feature that @inietov put together.
Cancel requested assets without checkin/out [ch-17606] by @inietov in #13219

Screenshots

image

Snipe-IT Version

6.1.2

Operating System

Windows

Web Server

IIS

PHP Version

8.0.24

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

@else

                                    (deleted user)

                                @endif

                            </td>

                            <td>{{ App\Helpers\Helper::getFormattedDateObject($request->created_at, 'datetime', false) }}</td>

                            <td>

                                {{ Form::open([

                                    'method' => 'POST',

                                    'route' => ['account/request-item', $request->itemType(), $request->requestable->id, true, $request->requestingUser()->id],

                                    ]) }}

                                    <button class="btn btn-warning btn-sm" data-tooltip="true" title="{{ trans('general.cancel_request') }}">{{ trans('button.cancel') }}</button>

                                {{ Form::close() }}

                            </td>

                            <td>

                                @if ($request->itemType() == "asset")

                                    @if ($request->requestable->assigned_to=='')

                                        <a href="{{ config('app.url') }}/hardware/{{ $request->requestable->id }}/checkout" class="btn btn-sm bg-maroon" data-tooltip="true" title="{{ trans('general.checkout_user_tooltip') }}">{{ trans('general.checko

                                        @else

                                        <a href="{{ config('app.url') }}/hardware/{{ $request->requestable->id }}/checkin" class="btn btn-sm bg-purple" data-tooltip="true" title="{{ trans('general.checkin_toolip') }}">{{ trans('general.checkin') }}</

                                    @endif


                                @endif

                            </td>



                    </tr>

                    @endif

                    @endforeach

                </tbody>

            </table>

        </div>

Additional context

No response

@inietov inietov self-assigned this Jul 10, 2023
@inietov inietov changed the title Requested Assets Error Showing Requested Assets Jul 10, 2023
@inietov
Copy link
Collaborator

inietov commented Jul 10, 2023

I think I know what happened, please check the PR I linked recently to this convo.

Thanks for your report!!

@brianhoganm
Copy link
Author

brianhoganm commented Jul 11, 2023

I think I know what happened, please check the PR I linked recently to this convo.

Thanks for your report!!

Thank you for the quick prompt. I went ahead and made the modifications to the two files and this did not work. Not sure if there is something else going on. Thanks. For now, I copied the original code from 6.1 and it works now.

@snipe snipe closed this as completed in a5555a1 Jul 12, 2023
@brianhoganm
Copy link
Author

Hi,
I would like to re-open this again. I am still getting the 500 error message. I know that @inietov said that you fixed the code, but I am still getting the 500 error message. Is anyone else getting this error message. Luckily, I have the original file before you made this change and that works just fine. I really would like to get this resolved because when I update SnipeIT to the latest version it overwrites the original code. I always have to replace the new requested.blade.php file with an older version. I am afraid that at some point, I won't be able to use the old one when we move to SnipeIT version 7. Thanks.

@ndizzlecfizzle
Copy link

This is also happening to my installation

@ndizzlecfizzle
Copy link

@brianhoganm I was able to fix this by doing the following...

The fix: I loaded the database in Sequel Pro and navigated to the checkout_requests field. i deleted all the entries in there (there were only a few), and after deleting those entries I was able to reload the requested page and use it normally. Happy to walk you through it more in depth if you are still having these issues.

@x249918904
Copy link

我能够通过执行以下操作来解决这个问题......

解决方法:我在 Sequel Pro 中加载了数据库并导航到该字段。我删除了那里的所有条目(只有几个),删除这些条目后,我能够重新加载请求的页面并正常使用它。如果您仍然遇到这些问题,很乐意引导您更深入地了解它。checkout_requests

Hi,这个具体是如何操作呢,我遇到了相同的问题,但是一直未能解决,希望得到你的帮助,谢谢

@brianhoganm
Copy link
Author

我能够通过执行以下操作来解决这个问题......
解决方法:我在 Sequel Pro 中加载了数据库并导航到该字段。我删除了那里的所有条目(只有几个),删除这些条目后,我能够重新加载请求的页面并正常使用它。如果您仍然遇到这些问题,很乐意引导您更深入地了解它。checkout_requests

Hi,这个具体是如何操作呢,我遇到了相同的问题,但是一直未能解决,希望得到你的帮助,谢谢

Hi Thank you for sharing. I just tested this out and it works!

@caodongxu588
Copy link

@brianhoganm I was able to fix this by doing the following...

The fix: I loaded the database in Sequel Pro and navigated to the checkout_requests field. i deleted all the entries in there (there were only a few), and after deleting those entries I was able to reload the requested page and use it normally. Happy to walk you through it more in depth if you are still having these issues.

how to do this ?

@ndizzlecfizzle
Copy link

@brianhoganm I was able to fix this by doing the following...
The fix: I loaded the database in Sequel Pro and navigated to the checkout_requests field. i deleted all the entries in there (there were only a few), and after deleting those entries I was able to reload the requested page and use it normally. Happy to walk you through it more in depth if you are still having these issues.

how to do this ?

you need to download an app that can read your sql database. I used sequel pro which is a macOS app.

use the credentials for the sql database to login through the app and then find the checkout_requests section. delete any entries inside there and then reboot your snipeit instance. you should be all set after that.

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

5 participants