• Resolved footbridge

    (@footbridge)


    Hi Alex,
    I am having a an issue on the beer page I am receiving the following php errors:

    Notice: Undefined offset: 0 in C:\Webs\footbridgebrewery.com\wp-content\plugins\easy-beer-lister\functions.php on line 54
    Availability:
    Notice: Undefined variable: result in C:\Webs\footbridgebrewery.com\wp-content\plugins\easy-beer-lister\functions.php on line 71

    Unfortunately it is not returning any of the beers that I have entered and is only returning a page that has been published.

    Would you have any pointers on where to start trouble shooting?
    Or is there a way I can filter the posts that are returned?

    I really appreciate your time and your effort on this plugin it is exactly what we are looking for.
    Thanks,
    Dan

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author alexstandiford

    (@alexstandiford)

    Hey Dan!

    Oof, that’s not good! Let’s see if we can figure out what’s going wrong here.

    You’re referring to the single beer page, right? Similar to this http://brewio.alexstandiford.com/beers/unholy-famous-lambic/

    Thread Starter footbridge

    (@footbridge)

    Hey Alex,
    Thank you for the quick response. Let me back up I realized I did not give you much information.
    The default beers page https://www.footbridgebrewery.com/beers/
    is returning a standard post archive. I checked with the getting started and created a new menu entry for all beers to verify that the URL is correct.

    After this point I made a copy of the default page and created a test page named single-beers.php in the current theme directory.
    This is the page that I have been working on as not to edit the original theme used for the default beers page.
    Now that I have written this out the single page looks for the posting by name and that is why it is pulling up the page and breaking. 🙂 Sometimes you need to type it out.

    Would you be able to shed some light on why the post archive is not using the format and styling of the plugin?

    It is returning the the correct beers but wrong styling.

    Also I would like to say including the print menu was brilliant.
    Thanks,
    Dan

    Thread Starter footbridge

    (@footbridge)

    Hi Alex,
    I started digging and it appears that the default template page created for the beers page is not using the ebl-beer-template.php
    The css is loading correctly and I re ordered it t be last. The page is generating the correct classes.
    However the structure from the template is not being rendered. If I remove and reinstall will it recreate the auto provisioned page or is there a way for me to remove and recreate it at a DB level?
    Thank you again,
    Dan

    Plugin Author alexstandiford

    (@alexstandiford)

    Check this out:
    https://github.com/alexstandiford/easybeerlister/wiki/Beer-Page-Templates

    The beer page template page uses a default template that is built into the Easy Beer Lister plugin. This plugin can be overridden by adding a template PHP file to your theme named single-beers.php. The default template can be found here.

    I’m not 100% sure what your theme is doing to force that override, but if you add that template file directly into your theme, it may take care of the problem.

    Thread Starter footbridge

    (@footbridge)

    Thank you for the quick response,
    I have followed the instructions above
    I just created a new vanilla site running twenty seventeen theme and installed the plugin with the same results.
    I am running version 4.7 on IIS.
    Are there any URL rewrites or items that might be platform specific?

    Thread Starter footbridge

    (@footbridge)

    Hi Alex,
    I also realized that the plugin was not compatible with 4.7.
    I have created a new site that is 4.5.3 the issue persists.
    Is their a recommended version of PHP?
    Thanks again,
    Dan

    Thread Starter footbridge

    (@footbridge)

    Hi Alex,
    I wanted to follow up with this and say that the plugin works perfect with the Brewio theme.
    I will blame it on the beer 😉
    solved-user error
    Thank you for the great work.

    Plugin Author alexstandiford

    (@alexstandiford)

    THat’s great news! Thank you for the follow-up

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘php error on beer page’ is closed to new replies.