• Extensions
  • FriendsOfFlarum Mason, the discussion custom fields builder

IanM I get error after using php flarum cache:clear

Declaration of Flarum\Filesystem\FilesystemManager::resolve($name): Illuminate\Contracts\Filesystem\Filesystem should be compatible with Illuminate\Filesystem\FilesystemManager::resolve($name, $config = NULL) in /home/user/web/domain.com/public_html/vendor/flarum/core/src/Filesystem/FilesystemManager.php on line 38
  • IanM replied to this.
    5 days later

    1.0.1

    • Fix issue where starting a discussion resulted in a js error if Show tags as field was enabled FriendsOfFlarum/mason29
    Installation
    composer require fof/mason:"*"
    php flarum cache:clear

    First thanks for this extension!!!
    Today I installed Flarum the first time... It is exciting!

    But... ;-)
    How is it possible to change the Layout from the Mason-Fields?
    I want to add a field with a optional price-Tag....
    and it doesnt look nice 🙁
    So is it possible to change the styling for one single input?
    And to get it as Tag in the Category-Listing?

      6 days later
      21 days later

      GVG while I do agree that screenshots are very useful, there's also a very good reason we don't have any on most extension: it's a lot of work.

      I think all the FoF extension that have screenshots are completely outdated. It's very difficult to keep them up to date. And sometimes outdated screenshots give the wrong idea since they might show features that were changed or removed.

      The discussion first post is also often the same as the GitHub README file and it's not always practical to include screenshots in README since they need to be either hosted inside of the repository, or externally but then not all README viewers will show them the same way.

      I do hope we can standardize this a bit better between extensions in the future!

      • [deleted]

      GVG Please don't post in uppercase text to get a point across. You can place emphasis on words by using bold or italics, but uppercase text in forums is seen as shouting and impolite.

      This is a community forum where you'll get much more traction if you ask for something rather than simply complain about it's lack of existence.

      2 months later
      5 months later

      I'm starting to consider uses for this extension, I would like to know before I get into a real use case, if it would be possible to use the field answers set in each field (when we have not activated the custom fields) as dropdown filters in the discussion list. I would like to know if this could be developed without complicating the current implementation.

      3 months later

      clarkwinkelmann
      The composer will works like this after updated to 1.3.1 and enabled Mason.

      For convenience, I recorded this GIF on freeflarum. I got same errors on my self-hosted Flarum.
      Errors in console after clicked Start a Discussion button:

      forum.js?v=115bc3d5:sourcemap:2 TypeError: t.suggested_answers(...).forEach is not a function
      at forum.js?v=115bc3d5:sourcemap:383:11233
      at Array.forEach (<anonymous>)
      at n.oninit (forum.js?v=115bc3d5:sourcemap:383:11190)
      at Function.a (forum.js?v=115bc3d5:sourcemap:2:145019)
      at j (forum.js?v=115bc3d5:sourcemap:2:156895)
      at forum.js?v=115bc3d5:sourcemap:2:146713
      at forum.js?v=115bc3d5:sourcemap:2:146916
      at c (forum.js?v=115bc3d5:sourcemap:2:147039)
      at l (forum.js?v=115bc3d5:sourcemap:2:145183)
      at forum.js?v=115bc3d5:sourcemap:2:146031
      a @ forum.js?v=115bc3d5:sourcemap:2
      e.show @ forum.js?v=115bc3d5:sourcemap:2
      (anonymous) @ forum.js?v=115bc3d5:sourcemap:2
      n.newDiscussionAction @ forum.js?v=115bc3d5:sourcemap:2
      onclick @ forum.js?v=115bc3d5:sourcemap:2
      L.handleEvent @ forum.js?v=115bc3d5:sourcemap:2
      forum.js?v=115bc3d5:sourcemap:2 TypeError: Cannot read properties of undefined (reading 'onbeforeupdate')
      at forum.js?v=115bc3d5:sourcemap:2:149948
      at p (forum.js?v=115bc3d5:sourcemap:2:150156)
      at f (forum.js?v=115bc3d5:sourcemap:2:149572)
      at forum.js?v=115bc3d5:sourcemap:2:151356
      at p (forum.js?v=115bc3d5:sourcemap:2:151394)
      at f (forum.js?v=115bc3d5:sourcemap:2:148072)
      at forum.js?v=115bc3d5:sourcemap:2:151356
      at p (forum.js?v=115bc3d5:sourcemap:2:151394)
      at f (forum.js?v=115bc3d5:sourcemap:2:149572)
      at forum.js?v=115bc3d5:sourcemap:2:151356
      a @ forum.js?v=115bc3d5:sourcemap:2
      (anonymous) @ forum.js?v=115bc3d5:sourcemap:2
      requestAnimationFrame (async)
      u @ forum.js?v=115bc3d5:sourcemap:2
      (anonymous) @ forum.js?v=115bc3d5:sourcemap:2
      dispatch @ forum.js?v=115bc3d5:sourcemap:2
      v.handle @ forum.js?v=115bc3d5:sourcemap:2
      trigger @ forum.js?v=115bc3d5:sourcemap:2
      simulate @ forum.js?v=115bc3d5:sourcemap:2
      n @ forum.js?v=115bc3d5:sourcemap:2
      handler @ forum.js?v=115bc3d5:sourcemap:2
      dispatch @ forum.js?v=115bc3d5:sourcemap:2
      v.handle @ forum.js?v=115bc3d5:sourcemap:2
      trigger @ forum.js?v=115bc3d5:sourcemap:2
      (anonymous) @ forum.js?v=115bc3d5:sourcemap:2
      each @ forum.js?v=115bc3d5:sourcemap:2
      each @ forum.js?v=115bc3d5:sourcemap:2
      trigger @ forum.js?v=115bc3d5:sourcemap:2
      C.each.C.fn.<computed> @ forum.js?v=115bc3d5:sourcemap:2
      n.focus @ forum.js?v=115bc3d5:sourcemap:2
      (anonymous) @ forum.js?v=115bc3d5:sourcemap:2
      l @ forum.js?v=115bc3d5:sourcemap:2
      c @ forum.js?v=115bc3d5:sourcemap:2
      setTimeout (async)
      (anonymous) @ forum.js?v=115bc3d5:sourcemap:2
      u @ forum.js?v=115bc3d5:sourcemap:2
      fireWith @ forum.js?v=115bc3d5:sourcemap:2
      fire @ forum.js?v=115bc3d5:sourcemap:2
      u @ forum.js?v=115bc3d5:sourcemap:2
      fireWith @ forum.js?v=115bc3d5:sourcemap:2
      a @ forum.js?v=115bc3d5:sourcemap:2
      u @ forum.js?v=115bc3d5:sourcemap:2
      fireWith @ forum.js?v=115bc3d5:sourcemap:2
      fire @ forum.js?v=115bc3d5:sourcemap:2
      dequeue @ forum.js?v=115bc3d5:sourcemap:2
      r.complete @ forum.js?v=115bc3d5:sourcemap:2
      u @ forum.js?v=115bc3d5:sourcemap:2
      fireWith @ forum.js?v=115bc3d5:sourcemap:2
      u @ forum.js?v=115bc3d5:sourcemap:2
      C.fx.tick @ forum.js?v=115bc3d5:sourcemap:2
      ue @ forum.js?v=115bc3d5:sourcemap:2
      requestAnimationFrame (async)
      ue @ forum.js?v=115bc3d5:sourcemap:2
      requestAnimationFrame (async)
      ue @ forum.js?v=115bc3d5:sourcemap:2
      requestAnimationFrame (async)
      ue @ forum.js?v=115bc3d5:sourcemap:2
      requestAnimationFrame (async)
      ue @ forum.js?v=115bc3d5:sourcemap:2
      requestAnimationFrame (async)
      ue @ forum.js?v=115bc3d5:sourcemap:2
      requestAnimationFrame (async)
      ue @ forum.js?v=115bc3d5:sourcemap:2
      C.fx.start @ forum.js?v=115bc3d5:sourcemap:2
      C.fx.timer @ forum.js?v=115bc3d5:sourcemap:2
      he @ forum.js?v=115bc3d5:sourcemap:2
      s @ forum.js?v=115bc3d5:sourcemap:2
      dequeue @ forum.js?v=115bc3d5:sourcemap:2
      (anonymous) @ forum.js?v=115bc3d5:sourcemap:2
      each @ forum.js?v=115bc3d5:sourcemap:2
      each @ forum.js?v=115bc3d5:sourcemap:2
      queue @ forum.js?v=115bc3d5:sourcemap:2
      animate @ forum.js?v=115bc3d5:sourcemap:2
      n.animateHeightChange @ forum.js?v=115bc3d5:sourcemap:2
      n.show @ forum.js?v=115bc3d5:sourcemap:2
      n.animatePositionChange @ forum.js?v=115bc3d5:sourcemap:2
      n.onupdate @ forum.js?v=115bc3d5:sourcemap:2
      a @ forum.js?v=115bc3d5:sourcemap:2
      (anonymous) @ forum.js?v=115bc3d5:sourcemap:2
      a @ forum.js?v=115bc3d5:sourcemap:2
      (anonymous) @ forum.js?v=115bc3d5:sourcemap:2
      requestAnimationFrame (async)
      u @ forum.js?v=115bc3d5:sourcemap:2
      L.handleEvent @ forum.js?v=115bc3d5:sourcemap:2
      forum.js?v=115bc3d5:sourcemap:2 TypeError: Cannot read properties of undefined (reading 'onbeforeupdate')
      at forum.js?v=115bc3d5:sourcemap:2:149948
      at p (forum.js?v=115bc3d5:sourcemap:2:150156)
      at f (forum.js?v=115bc3d5:sourcemap:2:149572)
      at forum.js?v=115bc3d5:sourcemap:2:151356
      at p (forum.js?v=115bc3d5:sourcemap:2:151394)
      at f (forum.js?v=115bc3d5:sourcemap:2:148072)
      at forum.js?v=115bc3d5:sourcemap:2:151356
      at p (forum.js?v=115bc3d5:sourcemap:2:151394)
      at f (forum.js?v=115bc3d5:sourcemap:2:149572)
      at forum.js?v=115bc3d5:sourcemap:2:151356
      a @ forum.js?v=115bc3d5:sourcemap:2
      (anonymous) @ forum.js?v=115bc3d5:sourcemap:2
      requestAnimationFrame (async)
      u @ forum.js?v=115bc3d5:sourcemap:2
      (anonymous) @ forum.js?v=115bc3d5:sourcemap:2
      dispatch @ forum.js?v=115bc3d5:sourcemap:2
      v.handle @ forum.js?v=115bc3d5:sourcemap:2
      trigger @ forum.js?v=115bc3d5:sourcemap:2
      simulate @ forum.js?v=115bc3d5:sourcemap:2
      n @ forum.js?v=115bc3d5:sourcemap:2

      It will shows more errors if click on buttons on composer.

      a month later

      Version 1.1.0

      • Fixed answers not loading correctly on Flarum 1.3
      • Updated to Webpack 5 for smaller javascript bundle size
      • Fixed phantom commas appearing next to fields

      This update requires Flarum 1.2+

      This updates includes a breaking change for custom integrations that directly interact with the REST API or javascript models. The suggested_answers field relationship has been renamed to suggestedAnswers and the all_answers field relationship has been renamed to allAnswers. This change applies to the REST API include name, the key in the JSON data and the relationship method in javascript.

      a month later

      glo you can't. That feature is not available.

      There are discussions earlier about why it's so complex to implement.

        a month later

        I'm not sure if this is the extension I need, but it feels close, so I will ask here.

        I'd like to have a custom fields builder (like this extension) but then transform those inputs into a generic structure when users post. So as a basic example, if I have {url}, {name}, {color}, I could then specify a template for the top level post of;

        I found this amazing product called [{name}]({url}] available in {color}

        Should the user edit the post, they wouldn't be able to edit this templated output, but only the fields once again.

        Any advice on how to achieve this?

          carlreid it's doable, but will require custom javascript code. The extension doesn't have any helper that will achieve it. From a custom extension you can browse the attached answers, I think the relationship is called something like post.masonAnswers()