Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2020
    Posts
    226
    Plugin Contributions
    1

    Default A !!!Battle Of The Bands!!! module... nearly running?!?

    I'm hoping that the following means my module is actually close to working???

    Ok so I created this module with the help of chatgpt and somewhere along the line something has gone amiss. On the storefront currently if your not logged in as a customer and attempt to visit the battle of the bands page it will display the following correctly...

    Code:
    {"status":"error","message":"Access denied - Please log in to use this feature!"}
    Logging in as a customer then reveals the following...

    Code:
    {"status":"success","genres":[{"id":"3","name":"Alternative"},{"id":"2","name":"Metal"},{"id":"1","name":"Rock"}]}{"status":"error","message":"Invalid request."}{"error":"No genre selected"}{"status":"error","message":"Invalid data provided"}
    Instead of something to the effect of "there is no heat currently running, please check back later"

    I can't currently access the pages on the admin side for the module either as they seem to just reload to the main admin page. The only errors i seem to be getting make no sense either as it should let all customer vote but it seems to be oddly tripping up over a countried_id when my files seemingly don't mention countries_id at all...

    Code:
    #5  require(/home/u554521074/domains/ohcomputer.co.uk/public_html/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/u554521074/domains/ohcomputer.co.uk/public_html/index.php:94]
    --> PHP Notice: Country with countries_id = 223 is either disabled or does not exist. in /home/u554521074/domains/ohcomputer.co.uk/public_html/includes/functions/html_output.php on line 896.
    I also added a statement to see what was returned from trying to access the page...

    [07-Jan-2024 04:25:36 UTC] POST data: Array
    (
    )

    No doubt i am trying to achieve something that isn't possible as a feature of the module or that ive assigned something in the module that is already defined but i couldn't see "countries_id" and the only thing i can think that i'm trying to do that zen may not like is "jury invite" and "jury voting"

    Could anyone possibly give me any insight as to where I may have gone wrong to see that country id error??
    I'd be eternally grateful for any help/advise :)

    The only thing i have noticed myself is a table that is possibly already being used... was provided in the install.sql

    Code:
    CREATE TABLE IF NOT EXISTS `users` (
        `id` int(11) NOT NULL AUTO_INCREMENT,
        `username` varchar(255) NOT NULL,
        `password` varchar(255) NOT NULL,
        `email` varchar(255),
        -- Other user-related fields here
        PRIMARY KEY (`id`)
    );
    I suspect this is the same table used for account creation and possibly the issue??

    i have this on a new install on a fresh test site to avoid making any mess, allowing me to ensure it works on my hosting package and hopefully give it a test to find i've made it in a way it won't max out server resources.

    Code:
    www.ohcomputer.co.uk
    The url was my marketing friends suggestion yonks ago, we never did get around to trying this to see if i could get new clients, his thought was we was more likely to say, sell to a business customer with a more professional name opposed to "crazygamer" so for now it can serve as a temp testing site.

  2. #2
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,696
    Plugin Contributions
    9

    Default Re: A !!!Battle Of The Bands!!! module... nearly running?!?

    Quote Originally Posted by flappingfish View Post
    ...

    Code:
    #5  require(/home/u554521074/domains/ohcomputer.co.uk/public_html/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/u554521074/domains/ohcomputer.co.uk/public_html/index.php:94]
    --> PHP Notice: Country with countries_id = 223 is either disabled or does not exist. in /home/u554521074/domains/ohcomputer.co.uk/public_html/includes/functions/html_output.php on line 896.
    uh... the error seems pretty clear.

    one would need to go here:

    https://www.ohcomputer.co.uk/YOUR_AD...23&action=edit

    and enable or create that country. (in the base ZC that country is USA.)

    if, as you say, you can not get to your admin, one could enable or create that country in mysql. perhaps your chatGPT could help you with that...

    Quote Originally Posted by flappingfish View Post
    ...
    Could anyone possibly give me any insight as to where I may have gone wrong to see that country id error??
    I'd be eternally grateful for any help/advise :)
    promises, promises
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  3. #3
    Join Date
    Nov 2020
    Posts
    226
    Plugin Contributions
    1

    Default Re: A !!!Battle Of The Bands!!! module... nearly running?!?

    Thankyou Carl,

    I know its not the usual way to develop a module but for myself it is something i wanted to create for a long time and something i've not had luck finding someone available or keen on developing this at an affordable price. I'm surprised to see parts of this module actually working as intended and fully expected that debugging would be a massive learning curve. I genuinely tried resolving that particular issue for hours and you identified how to fix it instantly. I may be that good one day eventually if i keep trying, perhaps?

    I'm actually at the point where i see when it occasionally gives me a response with errors and it kind of weirdly compliments me for spotting the oversight and spits out a better reply?

    So... After activating US now as a country option i get no errors but this is kind of a major issue.... i am in the uk, so it would obviously make no sense as to why this would be set to america. I could see there was more than 223 countries setup too (about 240ish i believe) so it made no sense to me. I did specify it was a uk website, and the voters would predominantly by from the uk, it seems it may have added code somewhere to set it to uk residents only and most likely got the id number wrong but it must be doing it dynamically as i'm not seeing it right in front of me? As a uk registered customer i see the following...

    Code:
    {"status":"success","genres":[{"id":"3","name":"Alternative"},{"id":"2","name":"Metal"},{"id":"1","name":"Rock"}]}{"status":"error","message":"Invalid request."}{"error":"No genre selected"}{"status":"error","message":"Invalid data provided"}
    I have tried using developers toolkit to identify any files that had the phrase "countries_id=" and found no files that were part of the module in the results. I have checked every file in notepad too for "countries" and it does not show up. I am genuinely at a mystery to where or how it is fetching the definition that you must be in the US too actually access the page?

    It seems i also perhaps worded part of my message odd and should apologise and clarify that the admin page itself indeed works fine, it is literally just the link that should load the general page of links to the various other pages to control the module (such as setting up heats, submission reviews, inviting jury members... ect) and looks like this below for the link calls, not sure if there is an issue with these lines (or something i need to do still ie. sql query to add link correctly for the zen_href?) that is preventing it accessing the pages to display, hence the redirect?

    Code:
    <!-- Body -->
      <div id="content">
        <h1>Battle of the Bands Dashboard</h1>
        <div class="battle-of-the-bands-dashboard">
          <a href="<?php echo zen_href_link(FILENAME_BATTLE_OF_THE_BANDS_CONTROL); ?>">
            <img src="images/battle_of_the_bands_control_placeholder.png" alt="Control Panel" width="150" height="150">
          </a>
    which has a page title and filename definition..

    Code:
    define('PAGE_TITLE_BATTLE_OF_THE_BANDS_CONTROL', 'Manage Bands');
    Code:
    define('FILENAME_BATTLE_OF_THE_BANDS_CONTROL', 'manage_entries');
    It just redirects to the index page of the admin panel. Other than that countries_id issue id seen no error codes. I'm not seeing what i expect either so its a muted victory at the moment. I have edited the link to try and access the relevant pages but it either reloads to the main admin page still or gives a http 500 page.

    I will have to create an account and claim to be in the united states to view the next step on the storefront to see if it displays a "no heat running at present" status message as now i'm just getting the one log file showing what the error statement throws out as an empty request. I am fully aware that could change when i try to visit the page as "us citizen" though and give me something else to investigate

  4. #4
    Join Date
    Nov 2020
    Posts
    226
    Plugin Contributions
    1

    Default Re: A !!!Battle Of The Bands!!! module... nearly running?!?

    Code:
    {"status":"success","genres":[{"id":"3","name":"Alternative"},{"id":"2","name":"Metal"},{"id":"1","name":"Rock"}]}{"status":"error","message":"Invalid request."}{"error":"No genre selected"}{"status":"error","message":"Invalid data provided"}
    I'm getting the same response as a fresh account registered for the states too with no error codes :/

  5. #5
    Join Date
    Nov 2020
    Posts
    226
    Plugin Contributions
    1

    Default Re: A !!!Battle Of The Bands!!! module... nearly running?!?

    turns out it will work if on zen 157 and below after getting fed up and throwing it up as a job on freelancer. It needs rebuilding to work on zen 1.58 and too add insult to injury, when i asked chatgpt which is the latest zen version it was aware of... it answered....

    Code:
    As of my last update in April 2023, the most recent version of Zen Cart that I'm aware of is Zen Cart 1.5.8, which was released in March 2022. It's important to note that software versions can be updated frequently, so I recommend checking the official Zen Cart website or their GitHub repository for the latest information. Zen Cart regularly releases updates to address security issues, add new features, and improve compatibility, so staying up-to-date with the latest version is crucial for maintaining a secure and efficient online store.
    Cheers chatgpt, we do not have to worry about ai taking over the world just yet, thats for sure. I was very surprised to hear it would have worked on 1.55 - 1.57 though!!

  6. #6
    Join Date
    Nov 2020
    Posts
    226
    Plugin Contributions
    1

    Default Re: A !!!Battle Of The Bands!!! module... nearly running?!?

    Happy to report I now have 3 working pages and an admit jury function that sent a jury invitation email out. Full blown database meltdown seemed apparent after the link sent me to a hostinger branded 404 page. not sure if that was coincidental, but to be on the safe side i am taking a backup of the site files and db before i continue on at the moment. Main issue seems to be a lack of table columns. my install.sql looks a bit silly at the bottom but i'm quite happy and ready for a power nap

 

 

Similar Threads

  1. Running client side module in admin
    By hubert in forum Code Collaboration
    Replies: 2
    Last Post: 15 Feb 2016, 02:01 PM
  2. v139h Battle With Tax
    By pietpetoors in forum Basic Configuration
    Replies: 1
    Last Post: 1 Sep 2012, 10:56 AM
  3. Price bands per product.
    By rpain in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 11 Aug 2010, 09:43 AM
  4. Changing colour of header bands
    By irishshopper in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 5 Aug 2010, 02:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR