Coder Social home page Coder Social logo

Comments (19)

ben-biddington avatar ben-biddington commented on August 17, 2024

Hi Oxana,

I am looking at this right now on my fork.

from xeroizer.

ben-biddington avatar ben-biddington commented on August 17, 2024

If you update TrackingCategoryChildModel to use TrackingCategories as its xml_root_name, then this error no longer occurs, but the tracking categories are ignored.

This is due to the serialization defect as mentioned above. Xeroizer sends xml that looks like this (note the duplicate TrackingCategories nodes):

<ExampleNodes>
    <ExampleNode>
        <TrackingCategories>
            <TrackingCategories>
                <TrackingCategory>
                    <Name>State</Name>
                    <Option>WA</Option>
                </TrackingCategory>
            </TrackingCategories>
        </TrackingCategories>
    </ExampleNode>
</ExampleNodes>

from xeroizer.

ben-biddington avatar ben-biddington commented on August 17, 2024

@waynerobinson, this commit and the one prior describe the defect.

Can you verify?

from xeroizer.

waynerobinson avatar waynerobinson commented on August 17, 2024

Hi Ben

Yup, will have a look at this today/tomorrow.

Wayne

On Tuesday, 21 February 2012 at 9:30 AM, Ben Biddington wrote:

@waynerobinson, these two commits show the defect.

Can you verify?


Reply to this email directly or view it on GitHub:
#30 (comment)

from xeroizer.

ben-biddington avatar ben-biddington commented on August 17, 2024

Actually I am wrong about the name of the node -- Tracking is perfectly acceptable. It is just the duplication that appears to cause the PostDataInvalidException error.

[UPDATED]
Yep: totally wrong. The TrackingCategories node is only used by the TrackingCategories endpoint. The Tracking node is used whenever tracking is embedded within another resource.

from xeroizer.

waynerobinson avatar waynerobinson commented on August 17, 2024

That's what I thought to. I'm confused as to why this duplication is occurring so I need to do some testing.

On Tuesday, 21 February 2012 at 9:45 AM, Ben Biddington wrote:

Actually I am wrong about the name of the node -- Tracking is perfectly acceptable. It is just the duplication that appears to cause the PostDataInvalidException error.


Reply to this email directly or view it on GitHub:
#30 (comment)

from xeroizer.

ben-biddington avatar ben-biddington commented on August 17, 2024

here's a start

from xeroizer.

ben-biddington avatar ben-biddington commented on August 17, 2024

Any clues?

from xeroizer.

waynerobinson avatar waynerobinson commented on August 17, 2024

Sorry, still haven't had a chance to look at this and will be away
this weekend… on a BOAT.

On 24/02/2012, at 8:55 AM, Ben Biddington
[email protected]
wrote:

Any clues?


Reply to this email directly or view it on GitHub:
#30 (comment)

from xeroizer.

ben-biddington avatar ben-biddington commented on August 17, 2024

Hey @waynerobinson, any progress?

from xeroizer.

waynerobinson avatar waynerobinson commented on August 17, 2024

I've been working on a few Xeroizer-related things in the past few days and
I'll get to this specific issue soon.

Cheers

Wayne

On Thursday, April 12, 2012, Ben Biddington wrote:

Hey @waynerobinson, any progress?


Reply to this email directly or view it on GitHub:
#30 (comment)

from xeroizer.

waynerobinson avatar waynerobinson commented on August 17, 2024

Sorry it took so long, but this has now been resolved in the lastest API release.

Cheers

Wayne

from xeroizer.

ben-biddington avatar ben-biddington commented on August 17, 2024

Nice one, thanks.

Although I am getting two unit test failures from d53af49:

Error: test: JournalLine should journal_line tracking specified correctly. (JournalLineTest)
NoMethodError: undefined method `add_tracking_category' for nil:NilClass

Error: test: LineItem should line_item tracking specified correctly. (LineItemTest)
NoMethodError: undefined method `add_tracking' for nil:NilClass

Any tips?

from xeroizer.

waynerobinson avatar waynerobinson commented on August 17, 2024

Not sure, I don't get these errors when I run the tests:

bundle exec rake test:unit

Is your bundle up-to-date?

from xeroizer.

ben-biddington avatar ben-biddington commented on August 17, 2024

Yep, also just tried bundle update. Do you have this is in CI anywhere?

from xeroizer.

waynerobinson avatar waynerobinson commented on August 17, 2024

CI? Continuous Integration?

I don't have this library in a continuous integration test suite anywhere.

This tests fine on ruby 1.8.7, but I've found an error with these test cases on 1.9.2. Not sure what is causing them but will investigate.

from xeroizer.

ben-biddington avatar ben-biddington commented on August 17, 2024

Yep, I get the same behavior.

from xeroizer.

waynerobinson avatar waynerobinson commented on August 17, 2024

There was a ruby 1.9 inconsistency issue with code in the following format:

record = nil
records.each { |record| record = blah }
return record

In 1.8, the record value inside the block would be operating on the version of record outside the block, in 1.9, these variables are scoped locally to the block.

I have fixed the code where that was important, and I believe it is the only section that required that 1.8 feature.

from xeroizer.

ben-biddington avatar ben-biddington commented on August 17, 2024

Cheers, @waynerobinson

from xeroizer.

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.