WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: More Fields] Error in 1.3 version (22 posts)

  1. Peetboy
    Member
    Posted 5 years ago #

    Fatal error: Call to undefined method more_fields_object::rewrite_rules() in /mypath/wordpress/wp-content/plugins/more-fields/more-fields-manage-boxes.php on line 150
    Everytime when i'm inserting custom field I get this error. But finally the field is inserted.
    In the more-fields-manage-boxes.php on lines 150 and 151 are 2 function calls:
    $mf0->rewrite_rules();
    $mf0->flush_rewrite_rules();`
    There is only flush_rewrite_rules() function in the more-fields-object.php. The rewrite_rules() function is missing. Should I comment tha call to function?

  2. jodineuf
    Member
    Posted 5 years ago #

    I am having the same problem.

  3. teebru
    Member
    Posted 5 years ago #

    Did either one of you get this to work? I too am having this problem.

    thanks

  4. musicmasteria
    Member
    Posted 5 years ago #

    I got the same problem here too. Any ideas?

  5. Matty Cohen
    Member
    Posted 5 years ago #

    Hi Peetboy, jodineuf, teebru and musicmasteria,

    I'm not sure if this is the recommended solution by the plugin developer, but the following worked for me:

    - To resolve the Call to undefined method more_fields_object::rewrite_rules() error, replace $mf0->rewrite_rules(); on line 150 of more-fields-manage-boxes.php with $mf0->generate_rewrite_rules();

    - To resolve the "operand" error when adding fields, replace $wp_rewrite->rules = $new_rule + $wp_rewrite->rules; on line 768 of more-fields-object.php with $wp_rewrite->rules = $new_rule . ' + ' . $wp_rewrite->rules;

    Once again, these solutions worked for me in WordPress 2.8.3. The plugin developers may have better solutions than the above.

    Cheers,
    Matt.

  6. markgt
    Member
    Posted 5 years ago #

    great Matt! - works perfectly for me :)

    thanks for taking the time to post the fix.

  7. musicmasteria
    Member
    Posted 5 years ago #

    It works mattyza! Thanks for the help!

    I hope to plugin author fixes this in the next version.

  8. krembo99
    Member
    Posted 5 years ago #

    Thank you.
    More-fields is a great plugin, but documantation and support (updates and bugs) are somewhat missing....
    I had to touch the core files of that plugin at least 6 times, making hacks and changes with every WP upgrade.
    I guess this is the soft spot on open source plugins, It creates a dependency on the developer ....

  9. DeeMo
    Member
    Posted 5 years ago #

    Mattyza, I applied your solution but it breaks the Publish box ( save as draft, status etc). Looks like the ajax thingie wont work anymore, nothing happens when you try to edit the status...I deactivated the modified plugin and the publish box now works again. Anyone experiencing the same problem?

  10. krembo99
    Member
    Posted 5 years ago #

    take this file
    http://exobi.com/jessica/more-fields-object.txt
    and this
    http://exobi.com/jessica/more-fields-object.txt
    and overwrite the original ones from the core. (after backing up of course)

    this bug will be fixed (along with others, and I hope also the permalink problem) in 1.3 that is due soon i think.

  11. Paul de Wouters
    Human Made
    Posted 5 years ago #

    didn't you make a mistake? you posted the same file twice

  12. krembo99
    Member
    Posted 5 years ago #

    yes .. sorry about that .
    the second file is this :
    http://exobi.com/jessica/more-fields-write-js.txt
    first one is the same :
    http://exobi.com/jessica/more-fields-object.txt

  13. Chris McCoy
    Member
    Posted 5 years ago #

    any idea why my custom fields are being wiped out?

    ive tried the two .txt file updates, but still seems to be wiped out once i edit using more fields, funny thing is its only on apache 2 and php 5.0

    my other server is apache 1.3.x and mysql 5.1 and it works fine.

  14. krembo99
    Member
    Posted 5 years ago #

    those two files should fix the problem (at least on all my installations they did)
    Just to be on the safe side, have you re-named them to *.php ??
    and also, in your screen options, have you enabled 2-columns?

  15. markgt
    Member
    Posted 4 years ago #

    krembo99, thanks so much for that fix. It works! Fixed the permalink error and a clash with NextGen Gallery. I'm running WP 8.2.4 and More Fields 1.3.

    The only thing i noticed was that the new post type (in my case "Products") is no longer added to the main admin menu, but thats a small sacrifice to have the plugin working again.

    Thanks again from South Africa :)

  16. TXSRick2007
    Member
    Posted 4 years ago #

    I am using this plugin on a bunch of my sites and even though we have to tweak the code with each update. it is a major time saver.

  17. 143headphones
    Member
    Posted 4 years ago #

    My friend's site also has this problem. I think I have to let him post here as well.
    We both can't figure out how to fix it.

  18. JMulley
    Member
    Posted 4 years ago #

    This does not work with WP2.9.

  19. 143headphones
    Member
    Posted 4 years ago #

    Yes @JMulley. Same thing I thought of as well.

    ====================================
    143headphones
    Dr Dre Headphones

  20. trif3cta
    Member
    Posted 4 years ago #

    The only thing i noticed was that the new post type (in my case "Products") is no longer added to the main admin menu, but thats a small sacrifice to have the plugin working again.

    Same thing here (WP 2.9/MF 1.3). I reverted @krembo99's provided files to @mattyza's code changes and it seems to work fine.

    Thank you for the fixes, I really appreciate it.

  21. viter-z-bayraku
    Member
    Posted 4 years ago #

    @krembo99 thank you!

  22. trginter
    Member
    Posted 4 years ago #

    So I used krembo99's fix and now the same error is coming up that mattyza's fix solved.

    The two files that mattyza's fix edited wasn't changed though.

Topic Closed

This topic has been closed to new replies.

About this Topic