Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 11:58

    jakubmisek on master

    Create dotnet.yml Update dotnet.yml only build n… Update dotnet.yml add tests and 2 more (compare)

  • 11:58
    jakubmisek closed #714
  • 11:56
    jakubmisek synchronize #714
  • 11:56

    jakubmisek on gh-action

    Update dotnet.yml temp disable… (compare)

  • 11:55

    jakubmisek on master

    ERR_PdbWritingFailed (compare)

  • 11:49
    jakubmisek synchronize #714
  • 11:49

    jakubmisek on gh-action

    Update dotnet.yml tests (compare)

  • 11:46
    jakubmisek synchronize #714
  • 11:46

    jakubmisek on gh-action

    Update dotnet.yml add tests (compare)

  • 11:42
    jakubmisek synchronize #714
  • 11:42

    jakubmisek on gh-action

    Update dotnet.yml only build n… (compare)

  • 11:38
    jakubmisek opened #714
  • 11:38

    jakubmisek on gh-action

    Create dotnet.yml (compare)

  • 09:37
    roberthusak closed #713
  • 09:37

    roberthusak on master

    Fix UTC handling in DateTime pa… (compare)

  • 09:31
    roberthusak labeled #713
  • 09:31
    roberthusak assigned #713
  • 09:31
    roberthusak opened #713
  • Mar 29 22:22
    smx-smx commented #712
  • Mar 29 20:10
    jakubmisek commented #711
Jakub Míšek
@jakubmisek
@Valks oops
@Valks can we have some steps to reproduce the issue? I can add products, and list them as well (in the dashboard).
Wayne Adams
@Valks
Let me put a sample together.
Wayne Adams
@Valks
So the setup I have is:
  • Docker - mariadb:latest (Deleted the database)
  • Updated project to use the latest packages
  • Woocommerce, downloaded the production release of 3.9.2 and replaced the folder in the package.
  • Modified the project file to include everything as per your previous message (I'll refine it later)
  • Go through the wizards then try to view orders or view products to get the wpPostStore error. Add Product to crash the process
    https://github.com/Valks/Peachpie-woocommerce
Jakub Míšek
@jakubmisek
ok @Valks, we'll try your repo if it happens there
Jakub Míšek
@jakubmisek

@Valks it's probably stack overflow issue (iolevel/wpdotnet-sdk#64) fixed in peachpiecompiler/peachpie@5b0b974

we'll be releasing an update soon since there are few more issues resolved for other major frameworks

Jakub Míšek
@jakubmisek
update released
  • peachpie 0.9.910
  • wpdotnet 1.0.0-beta910
Wayne Adams
@Valks
@jakubmisek awesome, I'll give it a go :)
Wayne Adams
@Valks
Fixes the access violation :)
but still hitting the runtime exception when adding a product or viewing orders. That said I'll take a closer look to see if I'm doing something wrong
Jakub Míšek
@jakubmisek
thanks @Valks please let me know if you find anything, we'll keep looking into it as well!
Wayne Adams
@Valks
on a quick side note, ran into an issue where a plugin uses the PHP constants: PHP_INT_MAX and PHP_INT_MIN which aren't defined in peachpie yet
Jakub Míšek
@jakubmisek
oh, I'm sure they are there ... isn't in a namespace or something?
Wayne Adams
@Valks
hmm
ah, that was my fault. Trying to read the value using the Immediate Window
should have known from the error, I get an overflow exception when using add_action and the function sets the priority as PHP_INT_MAX
add_action( 'woocommerce_view_order', 'electro_wrap_track_order_close', PHP_INT_MAX );
Jakub Míšek
@jakubmisek

I see! Is it your code or a part of woocommerce?

seems we have mismatch in int32/int64. Array can only be indexed with Int32 but PHP_INT is Int64, that's why it happens ... earlier in PeachPie it silently overflowed

Wayne Adams
@Valks
That is in the theme I'm using. Thought I'd give it a test with everything loaded as a quick experiment.
Jakub Míšek
@jakubmisek
ok for now we have an issue for it peachpiecompiler/peachpie#700 , instead of PHP_INT_MAX, you can use just a really big number :)
Wayne Adams
@Valks
Yeah I did that after mentioning it. Continued on nicely after that.
Jakub Míšek
@jakubmisek

Nice, the next update will handle 64bit keys.

@Valks do you use any WooCommerce plugins? like WooCommerce Admin, .. we should try a few of them as well

Wayne Adams
@Valks
I'll go through and try everything I use and give you an update.
I'll also try using WooCommerce 4.0 since that is now released. I had a few issues with it before but hopefully that was because it wasn't a release build.
Wayne Adams
@Valks

well woocommerce 4.0 suffers from:

System.MissingFieldException
  HResult=0x80131511
  Message=Undefined property: Automattic\WooCommerce\Admin\Schedulers\ImportScheduler::$name
  Source=<Cannot evaluate the exception source>
  StackTrace:
<Cannot evaluate the exception stack trace>

Pretty sure I mentioned the same issue before, don't remember if it was resolved or not

public static function get_default_scheduler_actions() {
        return array(
            'schedule_action' => 'wc-admin_schedule_action_' . static::$name,
            'queue_batches'   => 'wc-admin_queue_batches_' . static::$name,
        );
    }
static::$name
Wayne Adams
@Valks
Looking at the locals I see <static> Name = "Automattic\WooCommerce\Admin\Schedulers\ImportScheduler"
So I thought it might be a simple casing issue so I tried static::$Name but that still didn't work.
Wayne Adams
@Valks

taking a closer look the ImportScheduler trait is used to extend other classes that set public static $name = 'customers'; but the static values set on the parent class aren't accessible by the trait.

example:

<?php

trait TestTrait {
  public static function init() {
    echo static::$name;
  }
}

class TestClass extends TestTrait {
  public static $name = 'test';

  public static function init() {
    parent::init();
  }
}
Wayne Adams
@Valks
Woocommerce Google Analytics Pro
class WC_Google_Analytics_Pro_Measurement_Protocol_API_Request implements Framework\SV_WC_API_Request {

...

public function get_params() {
        return parent::get_params();
    }

public function get_data() {

        return parent::get_data();
    }
...

}
Severity    Code    Description    Project    File    Line    Suppression State
Error    PHP2070    Cannot access parent:: when current class scope has no parent    WooCommerceGoogleAnalyticsPro    C:\wordpress\src\Plugins\WooCommerceGoogleAnalyticsPro\wp-content\plugins\woocommerce-google-analytics-pro\includes\api\class-wc-google-analytics-pro-measurement-protocol-api-request.php    95
Jakub Míšek
@jakubmisek
thanks @Valks ; I though we have fixed the ImportSchedulertrait (it was caused by staticlate forwarding https://github.com/peachpiecompiler/peachpie/issues/680) . Let me try your test case
yep PHP2070 is issue in their code, it wouldn't work in PHP either
Wayne Adams
@Valks

@jakubmisek I assume the ImportScheduler change is done post .910 ? If so no problem there.
As for woocommerce google analytics pro that's kinda sad since it's a paid plugin by woocommerce themselves. I might contact them to see if I can get them to take a look.

As for my site I've almost finished setting all the plugins up to compile, hopefully I'll finish today then I'll create an issue with a list of issues. So far almost all plugins compile (5 are failing so far). That said one of the hardest issues is with long file paths, I wish they would update VS to support long file paths (I know msbuild supports them with a group policy enabled).

Jakub Míšek
@jakubmisek
ImportScheduler change was done before, so this must be something else I guess. I'm currently trying the 4.0 version but I'm stuck at some other issue.
Jakub Míšek
@jakubmisek
ok it's one more special case peachpiecompiler/peachpie#703 working on it
Wayne Adams
@Valks
awesome
I was just looking now wondering if I missed something
Jakub Míšek
@jakubmisek
seems this is it, also WC 4.0 looks easier to install
Wayne Adams
@Valks
they try and sell more stuff in the process
Wayne Adams
@Valks
Well as it stands I have 8 plugins which I can't compile. That said a few might be due to path length restrictions, I'll test that next and get a better count.
As for run well woocommerce crashes so hard to test since a lot of the plugins depend on it.
Jakub Míšek
@jakubmisek
actually I think the path length restriction is because of the NuGet. You can disable packing the project into NuGet to avoid this?
Wayne Adams
@Valks
for the moment I'm not using nuget packages
that was going to be my next step when setting up the CI/CD pipeline
Wayne Adams
@Valks
ok so fixing the long paths issue only helped one plugin
Jakub Míšek
@jakubmisek
what is the error with other plugins ?
Wayne Adams
@Valks
I need to go through them and compile a list
Jakub Míšek
@jakubmisek
thanks!
Wayne Adams
@Valks
Just put up issue #704 . That's the outstanding errors during compile time. Some I can do more work on i.e. the gift cards plugin missing TCPDF but there was issues with TCPDF.
Oh I also don't use the amazon s3 plugin, it was added purely to suppress errors in another plugin.
sorry warnings not errors
Robert Sundström
@robertsundstrom
I'm quite new to Wordpress in the context of .NET. Where should I put my custom theme during development?
Jakub Míšek
@jakubmisek

that's a good question @robertsundstrom :)
we're still tuning the whole thing, sorry there is no official tutorial or documentation yet.

if you clone the project https://github.com/iolevel/peachpie-wordpress
put your themes and plugins into MyContent directory