USPS plugin quotes 2× actual rate - dimensional weight from per-unit dimensions?

  • Posts: 214
  • Thank you received: 7
  • Hikashop Business
2 weeks 6 days ago #371989

-- url of the page with the problem -- : pearblossomfarms.com/products
-- HikaShop version -- : 6.4.1
-- Joomla version -- : 4.4.14
-- PHP version -- : 8.2
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : n/a

I'm seeing a systematic overquoting problem where the USPS plugin quotes customers roughly 2× what the shipper actually pays via Click-N-Ship (Business Rate Card / Commercial pricing), for the same USPS Ground Advantage service.

USPS Plugin Setup:

  • Origin ZIP: 81326 (Durango, CO area)
  • Service selected in plugin: USPS Ground Advantage only
  • Price Type: Commercial
  • Group Packages: Yes
  • Packaging weight: 0 oz, Weight approximation: 0%
  • Product dimensions entered per unit (e.g., a single jar: 4" × 3" × 3", 1.02 lb)

The problem — likely dimensional weight:

Product dimensions are entered per individual unit in HikaShop. For a multi-unit order (e.g., 12 jars), I believe the plugin packs N items using those per-unit dimensions and selects the smallest box from the configured box list that fits them.

Our box sizes:
  • Small: 12" × 10" × 12" (1,440 ci) — used for orders under 11 lbs
  • Medium: 16" × 14" × 16" (3,584 ci) — used for orders 11–32 lbs

The USPS dimensional weight threshold is 1,728 cubic inches (volume ÷ 166 = billed weight). Our Small box (1,440 ci) stays under the threshold — no dimensional weight, billed at actual weight. Our Medium box (3,584 ci) is well above it — dimensional weight = 3,584 ÷ 166 = 21.6 lb billed weight, even if the actual package weighs only 8–9 lbs.

Cross-referenced with real shipment data:

I exported 60 days of Click-N-Ship history (37 labels, all USPS Ground Advantage). Comparing actual postage paid to the website quote:
CustomerWebsite quotesActual GA paidRatio
Lauterbach$20.28$12.391.64×
Drake$35.37$14.092.51×
Hummel$33.10$8.483.90×
Kolb$25.24$10.742.35×
Steakley$16.81$13.831.22×

The "close" orders (ratio ~1.2×) are recent ones where product dimensions may happen to fit the correct box. The large outliers suggest the plugin is selecting the Medium box (triggering dimensional weight) when the actual shipper uses the Small box.

My questions:
  1. How does the plugin calculate which box to select for a multi-unit order? Does it sum per-unit volumes and find the smallest fitting box, or use a different algorithm?
  2. Does the plugin compute and send a dimensional weight to the USPS API when the selected box exceeds 1,728 ci? Or does it always send actual weight?
  3. Is there a way to set a fixed box size per product (rather than having the plugin compute from per-unit dimensions) so it always requests the rate for the box the shipper actually uses?
  4. Is the plugin currently using the new USPS API? I saw a March 2025 forum thread where Nicolas mentioned a new plugin was being developed to replace the old Web Tools API (retired January 25, 2026). We're now in May 2026 — is there an updated plugin I should install?

Happy to enable Debug mode and share the XML being sent to USPS at checkout if that helps diagnose.

Thank you.

(Note on Hikashop version: I am actually running an older version of HikaShop. The previous update broke image links on every product, reset the currency from USD to EUR, deleted the default shipping address, and disrupted the CSS — on a live production site. I have not been able to safely update since. I am testing the 6.4.1 update on a cloned subdirectory before applying it to the live site. I listed 6.4.1 to avoid the forum blocking my post — I hope that context is understandable.)

Please Log in or Create an account to join the conversation.

  • Posts: 85723
  • Thank you received: 14052
  • MODERATOR
2 weeks 6 days ago #371990

Hello,

1.
Regarding the packing logic, where the 2x to 3.9x discrepancy almost certainly comes from, HikaShop does not have a "shipping box catalogue" concept. It does not know about your Small (1,440 cu in) or Medium (3,584 cu in) USPS boxes. What it does instead, for every quote request, is:
- Take each product's per-unit dimensions (length, width, height) and weight.
- For an order line of N units of one product, build a virtual package by stacking N units along the product's smallest dimension. So for example 6 units of a 4 x 6 x 10 in product become a single 24 x 6 x 10 in virtual package. The other two dimensions stay at the single-unit max.
- Split that into additional packages only when a hard USPS limit is reached (provided by the plugin): 70 lb total weight, or 130 in length + girth.

2.
HikaShop doesn't compute DIM weight on its side. It sends raw weight + length/width/height to USPS, and USPS applies its own DIM weight rule on their end.

3.
There is no built-in way to map "Product X => Small Box" or "Product Y => Medium Box". The dimensions sent to USPS come from the product record, not from a box library. The two workarounds we suggest to merchants in your situation are:
- Set each product's dimensions to the dimensions of the shipping box that will actually be used for one unit of that product (so a soap that goes in a 6 x 6 x 4 mailer should be configured as 6 x 6 x 4, not as the bar itself). HikaShop's stacking logic for multi-unit orders then approximates a stack of those boxes, which is usually closer to the truth than stacking the bare products.
- Use a "Group packages" toggle on the plugin (setting "Group packages") and the per-API "Packaging weight" settings (Letters / Flats / Packages) to add the empty-box weight on top, so the rated weight matches what you actually put on the scale.
The "Group packages" option is enabled by default; when disabled, each unit is rated as its own package, which would absolutely explain a 2x+ overquote on multi-unit orders. Worth a quick check that it is on for your configuration.

A few other usual suspects for 2x+ over-quotes on Ground Advantage:

- "Price type" in the plugin settings: should be Commercial in your case (you mentioned you use Click-N-Ship Commercial Plus). Retail would be substantially higher.
- "Weight approximation" and "Dimension approximation" inputs in the plugin: any non-zero value here is added on top of every package's weight / smallest-dim and can quietly inflate the rated package.
- "Has nonstandard characteristics" toggle: if on, USPS adds a nonstandard surcharge that you probably do not pay on your own labels.

To investigate your specific 2x to 3.9x gap, what would help us most is one concrete order from your data:
- The list of products in the cart, each with their HikaShop product dimensions (L x W x H, units) and weight (units) as stored in the backend, and the quantity ordered.
- The shipping destination ZIP code.
- The rate HikaShop quoted at checkout, and the rate Click-N-Ship actually charged you on the label.
- A screenshot of the USPS plugin's settings page, especially the Price type, Services, Group packages, the approximation fields, and the packaging weight fields.

4.
Yes, the plugin we released last year at www.hikashop.com/marketplace/product/290-usps.html uses the new API.

Please Log in or Create an account to join the conversation.

  • Posts: 214
  • Thank you received: 7
  • Hikashop Business
1 week 4 days ago #372098

Thank you for the detailed explanation — very helpful. Here is the concrete example you asked for, plus a follow-up question about upgrading.

Concrete order: Kolb (Order E2D1K94, 2026-05-10)

Product in cart:

  • Name: Dad's Green Jalapeño Sauce Case - 12 bottles
  • SKU: PBFR-12-SAU-GRN-R
  • HikaShop stored dimensions: 16.000 × 12.000 × 9.000 in (volume = exactly 1,728 ci)
  • HikaShop stored weight: 8.640 lb
  • Quantity ordered: 1

Destination ZIP: 83702 (Boise, ID)
Origin ZIP: 81326 (Bayfield/Durango, CO)

HikaShop quote at checkout: $25.24 (USPS Ground Advantage)
Actual paid via Click-N-Ship Business Rate Card: $10.74 (USPS Ground Advantage)
Ratio: 2.35×

Plugin settings at time of order:
  • Price Type: Commercial
  • Group packages: Yes
  • Packaging weight: 0 oz
  • Weight approximation: 0%
  • Has nonstandard characteristics: OFF

The edge-case question:

The product dimensions (16 × 12 × 9) produce a volume of exactly 1,728 ci — the precise USPS DIM weight threshold. When the plugin sends these dimensions to the USPS API, does USPS apply dimensional weight at exactly 1,728 ci (i.e., does it use ≥ 1,728 or > 1,728)? If DIM weight is triggered: 1,728 ÷ 166 = 10.41 lb billed weight vs 8.64 lb actual. That alone is a modest ~20% difference and would not explain the 2.35× overquote. So something else is inflating the rate further — possibly a zone or price-type discrepancy in what the API returns. The Debug output would presumably show this — happy to provide it if that helps.

Note: these product dimensions are the actual case dimensions (the product is sold as a 12-bottle case), so the stored dimensions already reflect what goes on the scale. The stacking logic for quantity=1 is irrelevant here.

Edit: I should clarify the plugin setup. I have two USPS plugins installed: the original built-in one (element: usps, ID 10093 in my installation) which is disabled, and the new marketplace plugin (element: usps2, ID 10856) which is active — purchased in February 2026. All quotes, including the Kolb example above, are coming from the new marketplace plugin running on the current USPS API.

---

Second question: safe HikaShop upgrade

We are currently on HikaShop Business 6.1.0 / Joomla 4.4.14. When we last updated HikaShop (some time ago), the update caused: all product image links to break (images had to be remapped one by one), currency reset from USD to EUR, default shipping address deleted, and CSS disruption to the storefront. This was on a live production site and it was a significant amount of recovery work — which is why we have not updated since.

We are planning to test the 6.1.0 → 6.4.1 update on a cloned subdirectory before touching the live site. Two questions:
  1. Is this kind of breakage (image relinking, currency/address reset) a known issue with certain HikaShop version jumps, or is it likely something specific to our installation? Knowing this would help us anticipate what to expect on the clone.
  2. Is there a recommended pre-update export or backup procedure — beyond a full database dump — that protects image assignments and configuration values specifically? We are aware of the Products CSV export but are not sure if that fully captures image file references in a way that makes reimport reliable.

Thank you again.

Attachments:
Last edit: 1 week 4 days ago by conticreative.

Please Log in or Create an account to join the conversation.

  • Posts: 85723
  • Thank you received: 14052
  • MODERATOR
1 week 4 days ago #372103

Thank you for the very detailed example. It actually points straight at the cause, and it is not the packing or dimensional weight.

On the dimensional weight edge case first, so it is out of the way: for Ground Advantage, USPS only applies dimensional weight to parcels that measure more than one cubic foot (more than 1,728 cubic inches), and only for zones 5 to 9. Your case is exactly 1,728 ci, which is the threshold, not above it, so dimensional weight does not trigger at all here. The package is rated on its actual 8.64 lb. So DIM weight is not what is inflating your quote.

The real cause is the price tier the plugin is asking USPS for. The new plugin has a "Price type" setting with three values: Retail, Commercial and Contract. You have it set to Commercial, so the USPS API returns the published Commercial Base price. The rate you actually pay through Click-N-Ship Business (your Business Rate Card) is not the published Commercial price, it is account specific negotiated pricing, which USPS exposes through the API only under the Contract price type, and only when you identify your account.

So the fix to try is:

- In the USPS plugin settings, set "Price type" to Contract.
- Fill in "Account type" with the type that matches your USPS account (EPS, PERMIT or METER, EPS being the usual one for a Click-N-Ship / online account).
- Fill in "Account number" with your USPS account number.

With those set, the plugin sends your account details to USPS and the API returns your account's contract pricing instead of the generic Commercial price. That is what should bring the quotes down to what you actually pay on the label. If your Business Rate Card is tied to that account, Contract is the price type that surfaces it.

To verify exactly what each price type returns for a given order, enable Debug mode in the plugin and place a test order through checkout. The payment log file in the HikaShop configuration page will show the request sent to USPS and the prices returned, so you can compare Commercial vs Contract side by side for the same parcel.

On your example numbers, a $25.24 Commercial quote versus $10.74 Business Rate Card is exactly the kind of gap you would expect between published Commercial and account contract pricing, so this is very likely the whole story.

On your second question about upgrading:

The breakage you described from the previous update (product images unlinking, currency reset from USD to EUR, default shipping address deleted) is not normal HikaShop update behaviour. A standard update does not touch your currency configuration, your stored product image assignments, or your addresses. There is no code in HikaShop's update mechanism (even updating from really old versions) in order to trigger what you describe. So it is most likely specific to how that one update ran on your server, not an expected behaviour of a given version jump. From what you're saying, I would say that the hikashop_config table in the database got emptied and default data got put in afterwards.

Your plan to test 6.1.0 to 6.4.1 on a cloned subdirectory first is exactly the right approach. A few points for the clone:

- A full file backup plus a full database dump is the authoritative backup. There is no separate export needed to protect image assignments or config values: the image assignments live in the database (the hikashop_file table) and the configuration lives in the hikashop_config table, so a complete database dump already captures both. The Products CSV export is not the right tool for that and is not needed for the backup.
- Run the update in one clean pass: put the site offline, make sure PHP max_execution_time and memory_limit are generous, and let the update finish without interruption.
- After updating the clone, check the configuration page (currency, default addresses) and a few products with images before touching the live site.

If the clone update completes cleanly and your config and images are intact, the live update should behave the same way.

Please Log in or Create an account to join the conversation.

  • Posts: 214
  • Thank you received: 7
  • Hikashop Business
1 week 1 day ago #372123

I have edited the USPS plugin according to your guidelines. I am about to test it, but in the meantime I also tried a final upgrade of Hikashop pro on a clone of the website.

Update on the upgrade question:
I tested the 6.1.0 → 6.4.1 update on a cloned subdirectory with the following PHP settings (screenshot attached):

  • max_execution_time: 300
  • max_input_time: 300
  • memory_limit: 256M
  • PHP version: ea-php82
PHP Configuration


The installation wizard did not appear this time, which is progress (I attached the one that appeared the first time around for reference).


However, the same configuration fields were reset:
  • Currency: reverted to EUR (was USD)
  • Store address: cleared
  • Tax zone: reverted to Europe
  • Image thumbnail dimensions: reset to 100px (were 200px)
Image file links were preserved — products still show their images, which is an improvement over previous attempts.
Since the wizard did not run, the reset appears to be coming from the update process itself reinserting default values into the hikashop_config table, rather than from the wizard overwriting it. Is that correct? Is there a specific step or setting that controls whether the update rewrites config table defaults, and is there a way to prevent it?
Screenshots of before/after configuration attached.

Front End Comparison (Before > After)


Configuration Fields reset (before > After)

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 85723
  • Thank you received: 14052
  • MODERATOR
1 week 1 day ago #372125

Hi,

There is no such step or setting because this is not supposed to happen and it doesn't happen for anyone else when updating their HikaShop.
What's likely is that you have a problem with the hikashop_config table which leads to the update system behaving in an unexpected manner.
Try clicking on the "Check database" button on the configuration page of HikaShop. Does it says anything about the hikashop_config table ?

Please Log in or Create an account to join the conversation.

  • Posts: 214
  • Thank you received: 7
  • Hikashop Business
1 week 13 hours ago #372145

Indeed, when I checked the DB it gave me the following errors (I am pasting the entirety of the "check DB" results, Sorry if that's too much, as it's toward the bottom. I placed the error alone right under and the entire DB check after it.)

DB Error

Error Unknown column 'action_button_type' in 'WHERE'
Error hikashop_config: Duplicate entry 'cart_retaining_period_checked' for key 'PRIMARY'
Error
ALTER TABLE #__hikashop_config ADD PRIMARY KEY(config_namekey)
Info Missing core categories fixed

Full DB Check
OK Table "hikashop_address" checked
OK Table "hikashop_badge" checked
OK Table "hikashop_banner" checked
OK Table "hikashop_cart" checked
OK Table "hikashop_cart_product" checked
OK Table "hikashop_category" checked
OK Table "hikashop_characteristic" checked
OK Table "hikashop_click" checked
OK Table "hikashop_config" checked
OK Table "hikashop_currency" checked
OK Table "hikashop_discount" checked
OK Table "hikashop_download" checked
OK Table "hikashop_entry" checked
OK Table "hikashop_field" checked
OK Table "hikashop_file" checked
OK Table "hikashop_filter" checked
OK Table "hikashop_geolocation" checked
OK Table "hikashop_history" checked
OK Table "hikashop_limit" checked
OK Table "hikashop_massaction" checked
OK Table "hikashop_order" checked
OK Table "hikashop_orderstatus" checked
OK Table "hikashop_order_product" checked
OK Table "hikashop_payment" checked
OK Table "hikashop_price" checked
OK Table "hikashop_product" checked
OK Table "hikashop_product_category" checked
OK Table "hikashop_product_related" checked
OK Table "hikashop_plugin" checked
OK Table "hikashop_shipping" checked
OK Table "hikashop_shipping_price" checked
OK Table "hikashop_tax" checked
OK Table "hikashop_taxation" checked
OK Table "hikashop_user" checked
OK Table "hikashop_variant" checked
OK Table "hikashop_vote" checked
OK Table "hikashop_vote_user" checked
OK Table "hikashop_waitlist" checked
OK Table "hikashop_widget" checked
OK Table "hikashop_zone" checked
OK Table "hikashop_zone_link" checked
OK Table "hikashop_warehouse" checked
OK Table "hikashop_email_log" checked
Error Unknown column 'action_button_type' in 'WHERE'
Error hikashop_config: Duplicate entry 'cart_retaining_period_checked' for key 'PRIMARY'
Error
ALTER TABLE #__hikashop_config ADD PRIMARY KEY(config_namekey)
Info Missing core categories fixed
OK Product categories checked
OK Variants orphan links cleaned
OK Joomla users synchronized
OK User email addresses synchronized

Please Log in or Create an account to join the conversation.

  • Posts: 85723
  • Thank you received: 14052
  • MODERATOR
1 week 4 hours ago #372146

Hi,

The hikashop_config table is supposed to have a primary key on the config_namekey column, so there is only one entry per setting. The update system relies on that primary key: if an entry already exists for a setting it leaves it alone, otherwise it adds it. On your database that primary key is missing, so each update keeps adding a new (default) row for settings that already exist. When HikaShop reads the table, the last row returned by MySQL wins, which is the newly added default one, and your real settings look wiped out.

So the fix is to remove the duplicate rows (keeping one per setting) and let "Check database" put the primary key back. Rather than deleting them one namekey at a time, you can clean the whole table at once.

1. First make a backup: in phpMyAdmin, select the hikashop_config table and use Export, so you have a copy if anything goes wrong.

2. Then open the SQL tab and run this (replace PREFIX_ with your table prefix, the part before hikashop_config that you see in phpMyAdmin):

ALTER TABLE PREFIX_hikashop_config ADD COLUMN tmp_id INT AUTO_INCREMENT PRIMARY KEY;

DELETE c1 FROM PREFIX_hikashop_config c1
JOIN PREFIX_hikashop_config c2
ON c1.config_namekey = c2.config_namekey AND c1.tmp_id > c2.tmp_id;

ALTER TABLE PREFIX_hikashop_config DROP PRIMARY KEY, DROP COLUMN tmp_id;

What it does: it temporarily numbers the rows in the order they were added, deletes every duplicate while keeping the oldest one of each setting (your original value, not the default that was re-added), then removes that temporary column. It does this for every setting at once, not only cart_retaining_period_checked.

3. Click the "Check database" button again. With the duplicates gone, it will be able to add the missing primary key to hikashop_config, and the problem won't come back on the next updates.

4. Finally, go through your HikaShop configuration page settings and re-save anything that still looks wrong; now that there is a single entry per setting, the saved value sticks.

If "Check database" then reports the same kind of duplicate-key error on another table, the same approach works on that table by changing the table name (and the column it complains about).

The action_button_type error is probably linked to this and I hope the steps above will also take care of this.

Please Log in or Create an account to join the conversation.

  • Posts: 214
  • Thank you received: 7
  • Hikashop Business
13 hours ago #372206

I am just about to perform the SQL fix you outlined (I came down with the flu and I haven't had time to get around to it).

The last thing I did before the SQL was to change the USPS account type from NONE to EPS.
When I changed it to EPS, the USPS plugin stopped showing in checkout, as you can see in the screenshots I uploaded.

Frankly, I am still very ill and I cannot remember where I got the USPS account for the "USPS Account Number". Is it possible that I haven't configured the account properly or that the number is wrong?

I am going to go fix the SQL right now and I'll post back when I am done and I no longer see an error in the backend.




Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 214
  • Thank you received: 7
  • Hikashop Business
11 hours 2 minutes ago #372209

Follow-up: Clone test results — config table fix + 6.x update

Following the guidance in this thread, I ran a full test on a subdirectory clone before touching the live site. Here is a detailed summary of what was done and the current state.

---

Starting state of the clone

  • HikaShop version: Business 6.1.0
  • Joomla version: 4.4.14
  • PHP: ea-php82, max_execution_time: 300, memory_limit: 256M
  • Database: separate clone DB (same table prefix: ajx70_)
  • Active shipping plugin: HikaShop USPS 2 Shipping (usps2, v1.5.6, purchased Feb 2026, extension_id: 10856)
  • Old built-in USPS plugin (usps, extension_id: 10093): present but disabled

---

Note on sequence: The HikaShop update was actually applied before the SQL fix below. The SQL cleanup and PRIMARY KEY addition were performed on an already-updated database. This means we have not yet tested whether the primary key fix prevents config resets during the update — that would require a fresh clone test with the fix applied first.

---

Step 1 — Diagnosed and fixed the hikashop_config duplicate row problem

Per the suggestion in this thread, I ran a query to check for duplicates:
SELECT config_namekey, COUNT(*) as cnt
FROM ajx70_hikashop_config
GROUP BY config_namekey
HAVING cnt > 1;

This returned 35,162+ duplicate rows across many config keys. The root cause was a missing PRIMARY KEY on the config_namekey column, which allowed every HikaShop update to insert new default rows without removing the old ones. MySQL was returning the newest (default) row, making settings appear wiped after each update.

Fix applied (3-step SQL):
-- Step 1: Add a temporary auto-increment column to identify rows
ALTER TABLE ajx70_hikashop_config ADD COLUMN tmp_id INT AUTO_INCREMENT PRIMARY KEY;

-- Step 2: Delete all duplicate rows, keeping the oldest (lowest tmp_id) for each key
-- (took 216 seconds, deleted 35,162 rows)
DELETE c1 FROM ajx70_hikashop_config c1
JOIN ajx70_hikashop_config c2
  ON c1.config_namekey = c2.config_namekey
  AND c1.tmp_id > c2.tmp_id;

-- Step 3: Drop the temp column
ALTER TABLE ajx70_hikashop_config DROP PRIMARY KEY, DROP COLUMN tmp_id;

After running these 3 steps, a re-check still found 2 remaining duplicates:
config_namekey                cnt
------------------------------
cart_retaining_period_checked  2
website                        2

These were cleaned with a targeted DELETE, then the primary key was added directly via SQL (bypassing Check Database):
ALTER TABLE ajx70_hikashop_config ADD PRIMARY KEY(config_namekey);

This succeeded. A final run of HikaShop → System → Check Database returned all green — no errors.

---

Step 2 — HikaShop update (applied before the SQL fix)

The HikaShop update was installed via Joomla Extension Manager on the clone. The SQL fix in Step 1 was applied afterward to the already-updated database.

Manifest cache for the bundled USPS plugin after update:
{"name":"HikaShop USPS shipping plugin","version":"6.5.0","creationDate":"01 06 2026"}

Config values immediately after update:
  • Currency: reset from USD to EUR
  • Store address: cleared (was 3076 C Road, Palmdale CO 81526)
  • Tax zone: reset to Europe
  • Image thumbnail dimensions: 200px → 100px
  • Product image links: preserved (improvement over a previous test)

Note: since the update ran before the SQL fix, we cannot conclude from this test whether the primary key fix would have prevented the config reset. A fresh clone test — with the primary key added before running the update — would be needed to answer that. What we can say is that the update installer is writing default values that overwrite existing settings.

---

Step 3 — Shipping plugin status after update

When attempting to open any shipping plugin in the HikaShop backend (not just USPS — all of them), I receive:
An error has occurred.
0 Call to a member function loadArray() on null

I queried the extensions table to check plugin state:
SELECT extension_id, name, type, element, enabled, manifest_cache
FROM ajx70_extensions
WHERE element LIKE '%usps%';

Results:
  • extension_id 10093 | HikaShop USPS shipping plugin | usps | disabled | version 6.5.0 (updated with HikaShop)
  • extension_id 10856 | HikaShop USPS 2 Shipping | usps2 | enabled | version 1.5.6 (not updated — marketplace plugin)

The shipping record in ajx70_hikashop_shipping is intact (record exists, params present, published: 1). The error is not caused by a missing record.

Since the error occurs on all shipping plugins, not just usps2, this points to a problem in the shared HikaShop shipping admin view or a missing/changed database schema element introduced in the update — not a usps2 compatibility issue specifically.

---

Current state summary
  • hikashop_config PRIMARY KEY: fixed and in place
  • Check Database: all green
  • Config reset after update (currency/address/tax): still occurring
  • All shipping plugin edit pages: broken (loadArray() on null)
  • Live site: untouched — still on 6.1.0

---

Questions
  1. The config reset (USD→EUR, address cleared, tax zone) is still happening after the primary key fix. Is the update installer writing default values unconditionally, overwriting existing settings? Is there a way to prevent this, or is the correct approach to simply re-enter values manually after each update?
  2. All shipping plugin edit pages return "Call to a member function loadArray() on null" after the update. Is this a known issue with 6.5.0? Is there a schema migration step that needs to be run, or a table/column that the shipping admin view now requires that may not have been created during the update?
  3. The usps2 marketplace plugin (v1.5.6, purchased Feb 2026) was not updated alongside HikaShop. Is there a newer version of usps2 that should be installed after updating HikaShop, and could the missing update be contributing to the shipping admin error?

Thank you.

P.S.
As I worked on a clone of the live website, I can Clone it again, then apply the SQL and after that update both Hikashop and the USPS plugin. Do you think that may produce better results?

Please Log in or Create an account to join the conversation.

  • Posts: 85723
  • Thank you received: 14052
  • MODERATOR
3 hours 45 minutes ago #372210

Hi,

Thank you, that is an excellent write-up, and it lets me answer precisely. The short version is that everything you saw traces back to the missing primary key, and your P.S. plan is the right one.

1. Config values being reset by the update

The update installer is not overwriting your settings on purpose. HikaShop saves the configuration with a single REPLACE INTO query on the hikashop_config table, and REPLACE relies on the primary key on config_namekey to decide whether to update the existing row or insert a new one. When HikaShop reads the configuration back, it indexes the rows by config_namekey and, if a key appears more than once, the last row returned by MySQL wins.

With the primary key missing, REPLACE had nothing to match on, so it behaved like a plain INSERT: every save and every update appended a brand new row, including the default values written during the update. On the next read, the newest row (the default) won. That is the single cause of both the 35,162 duplicate rows and the settings looking wiped (USD to EUR, address, tax zone) after each update.

So you do not need to re-enter the values after every update. Once the primary key is back in place, REPLACE updates the one existing row per setting, and the values stick across updates. The resets you observed happened during the update you ran before the key was added, which is expected. The clean way to confirm the fix is exactly your P.S. plan (see the end).

2. "Call to a member function loadArray() on null" on every shipping plugin

This is not normal 6.5.0 behaviour: a clean update does not produce it, otherwise everyone would hit it. loadArray() is not called anywhere in HikaShop's own code, so this fatal is Joomla calling loadArray() on an object that is null while opening the plugin edit screen. That points at a missing schema element or an incomplete plugin extension record (null params / empty manifest_cache), which fits an update that could not finish cleanly on a database that was as damaged as yours was.

Three steps, in order:

a) Get the exact location. In Joomla, Global Configuration > Server > Error Reporting, set it to Maximum (or Development) and activate the Debug system setting, reproduce the error, and you will get the file, line and full stack trace instead of the one-line message. Send me that trace, it will tell us exactly which object is null and where the problem comes from.

b) Run "Check database" on the HikaShop configuration page after the update. It creates or repairs any missing tables, columns and keys for 6.5.0, the same mechanism that puts the config primary key back. On a database in your state, the update's own schema step may not have completed, and Check database finishes it.

c) If it still fails, reinstall the 6.5.0 package over the existing install (Joomla > Install Extensions, upload the same HikaShop package again). That re-runs the install routine, recreates any missing schema and refreshes the plugin manifests, without deleting your data. This usually clears half-applied-update states like this one.

3. The usps2 plugin not being updated with the core

usps2 is a separate plugin from the marketplace and updates on its own schedule, independent of the HikaShop core version, so it not moving when the core updated is normal. Your 1.5.6 is current, so you are not behind. After updating the core you can still go to the Updates area and install the latest usps2 if one is offered, as good hygiene. But it is very unlikely to be the cause of the admin error here, because that error hits every shipping plugin, not just usps2, so it is the shipping admin / install state rather than usps2 itself.

P.S. Your re-clone plan is exactly right, and I would do it that way:

1. Re-clone the live site (keep the backup).
2. On the clone, de-duplicate hikashop_config and add the primary key FIRST, before updating anything.
3. Then update HikaShop.
4. Run "Check database".
5. Then update usps2 to the latest.
6. Verify the shipping plugin edit pages open and that your settings (currency, address, tax zone) survived the update.

Doing the primary key fix before the update means REPLACE INTO works correctly throughout the update, so the settings will not be duplicated or reset, and step 6 directly answers your open question of whether the key fix prevents the resets. Once the clone passes, apply the same sequence to the live site (backup, de-dupe + primary key, update, Check database, update usps2).

Please Log in or Create an account to join the conversation.

Time to create page: 1.104 seconds
Powered by Kunena Forum