So, just tried this method with an addon that has a build.json file to include js script files, and for some reason that made things break again. With the build.json file in the folder, for some reason trying to install any older version causes XF to install the older version's files and...
So, after some trial and error I think I solved this issue.
Apparently, when running the BumpVersion command through CLI, this does not trigger any upgrade steps in the setup of the addon.
I may be not be doing this the intended way, but my solution was to uninstall the addon in the ACP...
In my setup.php I have:
namespace My/Addon;
use XF\AddOn\AbstractSetup;
use XF\AddOn\StepRunnerInstallTrait;
use XF\AddOn\StepRunnerUninstallTrait;
use XF\AddOn\StepRunnerUpgradeTrait;
use XF\Db\Schema\Alter;
use XF\Db\Schema\Create;
class Setup extends AbstractSetup
{
use...
I was thinking this would be an ACP category similar to permissions or custom user fields, with the ability to add new options and specify their type. When I'm adding one via SQL it's usually just a boolean option, such as "receive alerts for x" yes/no. From there it's up to the developer to...
Looking for guidance on leveraging the attachment manager to add a simple file attachment to a form in a custom addon. I want to be able to specify the folder where the attachment is saved, and make sure all of the proper details get saved in the correct tables to be able to reference the file...
Bumping this thread because it's silly one would need an addon to set permission for users to correct an error in their birthday. The prompt doesn't even allow them to error check, or ask them to enter it twice, or warn them that they can't change it later. Needs improvement.
Trying to determine if I can access entries in the xf_user_option (user preferences) table through the ACP and add them that way, instead of manually adding columns to the database...
Not sure if this has been fixed, and it's more of a "feature" than a bug, but..
We recently had a user spam a large number of resources (on request, but that's not important). Some users didn't like the flood, so they ignored this user. This resulted in whole pages of paginated results being...
Suggestion to replace if $template->History and similar:
$hasHistory = $this->finder('XF:TemplateHistory')
->where('type', $template->type)
->where('title', $template->title)
->where('style_id', $template->style_id)
->limit(1)
->fetch()
->count();
And in actionHistory, change this:
if...
After further testing, the root cause of the issue appears to be the TO::MANY relation of $template->History. Again, with indefinite records for each template, this relation will always cause a memory error if the history of edits gets too large.
Additionally, even if the actionHistory is corrected, this line from templateAddEdit also causes a memory error:
'hasHistory' => $template->exists() ? $template->History->count() : false,