Giter VIP home page Giter VIP logo

Comments (11)

sleimanx2 avatar sleimanx2 commented on July 18, 2024

Please can you provide the scenario to reproduce the error ? , I assume it's on save.

from plastic.

 avatar commented on July 18, 2024

On create as provoked by seeding records.

from plastic.

sleimanx2 avatar sleimanx2 commented on July 18, 2024

can you provide me with the output of $model->getDocumentData() $model is the instance you are trying to seed ...

from plastic.

 avatar commented on July 18, 2024

Looks like there was a follow-up question for this while I was travelling and now this is closed. I'll see about getting the results of that call today.

from plastic.

 avatar commented on July 18, 2024

So, I went ahead and figured out how to get artisan console debugging to work only to discover that I can't provide the data for $model->getDocumentData(), as the exception is being thrown with the following line:

$rule->description()->create([
    'body'=>$eachRule['body']
]);

In other words, just as I indicated in the original report, using this trait causes creating models with it to throw the above exception.

from plastic.

 avatar commented on July 18, 2024

Here's an example document from getDocumentData inside the save event handler from the Searchable trait that throws the exception in question:
['id'=>7037, title'=>'Saga Point Exclusives Rule Description', 'body'=>'<p class="c1"> Saga Points are awarded for donations, or assisting staff and fellow players in making the game as fun as possible. While we are a not for profit game, for the purpose of rewarding these things, we had to establish a value for these points.</p> <p class="c1"> 1 SP - Hired Craft - Have an NPC Crafter perform any single published Crafting Technique, either during a game or between games. No Tools need to be furnished, only the raw resources needed to create it. It will still require the standard listed times to craft this item.</p> <p class="c1"> 2 SP - Experienced - You gain 1 XP. Unlike experience points earned by attending an event, this XP is immediately spendable. You may purchase up to 5 XP per event in this manner.You may purchase up to 5 XP per event in this manner. <br /> 2 SP - Carrier Pigeon - With this reward you can send messages long distance almost instantly, and receive a response. (Think of it as Xep-o-phone)</p> <p class="c1"> 5 SP - Income - You gain 1 Gold coin. This may only be purchased five times per event.</p> <p class="c1"> 5 SP - Additional Mana - Add 1 to your Mana Pool. You must already begin each Arc with Mana to purchase this. This may only be purchased five times for the same character.</p> <p class="c6 c1"> 5 SP �- Shard of Preservation - A fragment of a shattered Soul Orb can't revive you from death, but it&rsquo;s not useless. You may instantly activate this item while Dropped to grant yourself a Heal 55 . No character may possess more than one of these at a time.</p> <p class="c1"> 10 SP - Alternate Character Slot - You may now play an additional character. You may only play one Player C haracter per Event , and will only gain XP for the chosen PC. A character must be played at least once per season to remain on the books.</p> <p class="c1"> 10 SP - Pulled Out Of The Fire - You have a Fair Escape! You may use this once for a Fair Escape from a dangerous circumstance. Once purchased, you may use this reward any time you choose. This is good for one use only.</p> <p class="c1"> 10 SP - Soul Orb - You may use this item to instantly revive at full HP upon death. This may only be purchased twice for the same character.</p> <p class="c1"> 15 SP - Fast Travel - Make a trip to a distant place and back quickly. Airship? Boat? Dragon? Who knows?! But you can make the journey!</p> <p class="c1"> 20 SP - Focused Immunity - For an entire Arc you are immune to a single Damage type, with the exception of the True descriptor.</p> <p class="c1"> 30 SP- Proprietor - For this amount, you have gained an &lsquo;Edifice&rsquo; with an Installed Implement of your choice for Crafting.</p> <p class="c1"> 30 SP - Character Rewrite - You cannot change your Race, Class, or Homeland, but you regain all the current XP you have gained for a single character; allowing you to redesign him or her to better suit your tastes. This XP must be spent on the same character. In addition, you should spend as much of this XP as possible during this recreation process.</p> <p class="c1"> 30 SP - Doc Galaxtik&rsquo;s Heal-Me-Now - For one event, you have a special bag of healing goodies. This will grant you one use of &ldquo;Heal 10&rdquo; per encounter. This is to represent potions or poultices purchased to help you.</p> <p class="c1"> 40 SP -Character Plot - This reward will allow you to work with Destroyer&rsquo;s Den staff to create a plot involving an aspect of your character&rsquo;s backstory or personality.</p> <p class="c1"> 50 SP-Mythical Warkai Form- For 50 sp you can request the Gamerunner&rsquo;s to make you a special form based on a mythical creature. This will replace your regular Warkai form and you will become known as a storied warkai.</p> <p class="c1"> 60 SP - Superior Alternate Character Slot - Upon spending this SP, you may play an additional character, You are eligible to purchase this reward once you have played 4 games with your primary PC. This character begins their first game as if it were Game 4 on the XP Growth Chart (see page 18). This means you have a total of 50 XP to spend at character generation (not inclusive of race/class variations). While you retain the right to use the Three Game Rule to rewrite this character, after the Three Games have passed, you will earn XP as normal. You may only play one character per event. </p> <p class="c1 c5"> </p> <div> <p class="c6 c23"> .</p> </div> <div> <p class="c6 c1"><a href="#ftnt_ref1" id="ftnt1">[1]</a> In this version of the rules, all Harvesting Abilities are Crafting Techniques.</p> </div><div> <p class="c6 c1"><a href="#ftnt_ref2" id="ftnt2">[2]</a> There are a few restrictions on this, e.g. Battle Monks may not purchase the Firearms Ability.</p> </div><div class="c26"> <p class="c1 c16 c30"><a href="#cmnt_ref1" id="cmnt1">[a]</a> Discuss at next meeting</p> </div>']

from plastic.

sleimanx2 avatar sleimanx2 commented on July 18, 2024

@capitaladot I've tried to use your input to mimic the call but I can't seem to trigger the exception. It would be easier to track the bug if you create a laravel project where you reconstruct the issue.

from plastic.

ChaoticWave avatar ChaoticWave commented on July 18, 2024

I'm pretty sure this is a bug in the elasticsearch/elasticsearch composer module. I'm in the process of tracking down the error. It looks like the JSON encoding failed, providing the value false in the body of the request. I will update here if I create a PR to that repo.

from plastic.

pz6tnk avatar pz6tnk commented on July 18, 2024

@ChaoticWave so how have you handled this error?

from plastic.

ChaoticWave avatar ChaoticWave commented on July 18, 2024

@pz6tnk I think it's got to do with encoding HTML in JSON. It screws up the parser in ES during ingestion. In the end, I didn't use this library in my project. However, I did run into this problem with the Elasticsearch API code. And I've only tried it with ES v2.x. It could be completely fixed in the later versions. I'm not sure.

Sorry for the late reply, I don't log in here much.

from plastic.

clyall avatar clyall commented on July 18, 2024

Hello, this is a super late response, but we ran into this issue as well.

For us, we had a bytea typed field in postgres that was being saved into elastic search. As @ChaoticWave stated, this data type in particular returns false from a json encode. Best advice is to check the types on all the fields you are saving, and figure out which type doesn't play nice with a json encode

from plastic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.