Jump to content

Richard Jedlička

Members
  • Posts

    100
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Richard Jedlička

  1. @ICF Church Hi, I'm trying to solve your issue, but I can't reproduce the error. What version of PHP are you using? During module installation there is a step where the `use` statemenents in source files under FieldtypePDF folder are prefixed with `Processwire\' namespace if PW 3.x detected. Could you please examine what's wrong? Look into this method https://github.com/uiii/ProcessWire-FieldtypePDF/blob/d11ff962d520782fa25215f5ce606886773a5a44/FieldtypePDF.module#L232. Thanks

  2. I had some problems with the database. E.g. the one @esper mentioned. So I deleted the table manually and uninstall the module, because it breaks the frontend when you accessing non-existing page. The error was something with myslqi and the message was 

    Couldn't fetch ProcessWire\Database

    I'm using PW 3.0.70, i'm not sure if it was working on PW 2.6

  3. On 19. 4. 2017 at 5:11 PM, Richard Jedlička said:

    I'd would like to implement the before_script option, but there are some things I'm not sure about. Your help is appreciated, see the issue: https://github.com/uiii/tense/issues/13#issuecomment-295303576

    It's done. I've considered the options and with @LostKobrakai's advice added beforeCmd config option allowing to run specified command after PW installation but before test suite execution. See more https://github.com/uiii/tense#beforecmd. Currently on master branch only.

     

    • Like 2
  4. 1 minute ago, adrian said:

    I am actually in two minds about supporting this via the API - I wonder if perhaps it should be controlled by an additional module config setting so devs can decide if they want this or not.

    It would be great :-)

    1 minute ago, adrian said:

    I feel like this is something you can do in the API yourself when you change the title? But maybe it would be easier if this module handled any required logic so you didn't have to think about?

    You, I can handle it myself, but the module handles also the conflicting page names, which is not trivial code.

  5. Hi @adrian,

    I've started to use you module, it is great when editing in admin, but it is useless when I change the title using the API. According to you code it uses javascript for it, which is good that is reflects the changes immediately. But could you consider checking the name on page save if it matches the title and change it if not (of course respecting the module settings)?

  6. Hi @LostKobrakai, I'm trying to use Migrations module, but I'm not sure how to start. What is you workflow when creating a migration? How do you test it before it is complete. Consider I have quite complex migration which adds a field (page reference type) and a tree of pages which references to. I think I'm not able to create the migration without bugs in one go. I would like to try it during development. The workflow which comes to my mind is I make a change, backup database, run migration, check admin changes, restore database, add other change to migration etc. Yes I should update the downgrade function simultaneously and instead of restoring the database restore the migration, but there is still high possibility of bugs during restore. What do you recommend? Thanks

  7. I've found the problem. There is a method getCoreBranches which returns the branches already loaded in session if the second parameter is false. But it is never called with the second parameter set to true:

    https://github.com/ryancramerdesign/ProcessWireUpgrade/blob/5333322703f0f47a6d6454e8fdb3107db330eec4/ProcessWireUpgradeCheck.module#L171

    So I changed temporarily the call and it works now. But I gues it should be enough to relogin.

    • Like 3
  8. Tense Packagist   

    Tense (Test ENvironment Setup & Execution) is a command-line tool to easily run tests agains multiple versions of ProcessWire CMF.

    Are you building a module, or a template and you need to make sure it works in all supported ProcessWire versions? Then Tense is exactly what you need. Write the tests in any testing framework, tell Tense which ProcessWire versions you are interested in and it will do the rest for you.

    asciicast.gif

    See example or see usage in a real project.

    Quote

    Motivation

    I'd like to improve the situation of automated testing in ProcessWire ecosystem. Because I was looking for a solution to test my module against multiple versions of ProcessWire and I thought someone had already a solution for this, but I didn't find any. On the contrary I've found out that almost nobody tests at all.

    How to use?

    1. Install it: 

    composer global require uiii/tense

    2. Create tense.yml config:

    tense init

    3. Run it:

    tense run

     

    For detailed instructions see Github page: https://github.com/uiii/tense

     

    This is made possible thanks to the great wireshell tool by @justb3a, @marcus and others.

     

    What do you think about it? Do you find it useful? Do you have some idea? Did you find some bug? Tell me you opinion. Write it here or in the issue tracker.

    • Like 17
  9. Hi lenoir,

    There is a version compatible with 3.0, it is in devns branch, it is separated because i didn't find a way to have one codebase compatible with PW 2.x and 3.x (I can tell you more if you want).

    What happend with your pdf files in 3.0? Why did you have to restore the database? Should I fix something?

    Cheers,
    Richard

    • Like 2
  10. Hi, sorry I din't do that yet. I stucked, because I wanted to test it properly first. I wanted to make automated unit tests, but in processwire it isn't (maybe wasn't) so easy, I wanted to use wireshell to help with it, but somehow I moved my activity somewhere else. I can merge the branches, but I would like to have some feedback if it is working correctly or not. Did you try it? I've tried it in PW 2.5 and 2.6 and it looks it's working, but I'm not sure about PW 2.7+. If you can test it a give me feedback I would appreciate it. Thanks

  11. Hi, I've been doing some research and testing. But I don't find a way to get it properly working on older versions of ghostscript. But @evan's solution works, it produces low quality images and it's properties cannot be affected because the pdf is read on the Imagick object creating. The readImage method always throws the mentioned exception. Despite of this it is useful where you cannot update GS or IM (e.g. shared hosting). So I added it to the module as fallback mode. It can be turned on in the module's settings. See DEV branch.

  12. Hi @evan,
    yes, it's probably because of the old version of IM and GS. What was the problem exactly (error message, ...), can you post it here? I also find that setColorspace method is supported since IM version 6.5.7, so I should change the code to reflect that. What is the problem with readImage method? Will it work if you comment only setColorspace?

×
×
  • Create New...